浏览代码

Disable syncing to disk for tests

This reduces test time by almost 70%.
Unrud 9 年之前
父节点
当前提交
6d85a731e5
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      radicale/tests/test_base.py

+ 4 - 0
radicale/tests/test_base.py

@@ -711,6 +711,8 @@ class TestMultiFileSystem(BaseRequests, BaseTest):
         super().setup()
         self.colpath = tempfile.mkdtemp()
         self.configuration.set("storage", "filesystem_folder", self.colpath)
+        # Disable syncing to disk for better performance
+        self.configuration.set("storage", "fsync", "False")
         self.application = Application(self.configuration, self.logger)
 
     def teardown(self):
@@ -725,6 +727,8 @@ class TestCustomStorageSystem(BaseRequests, BaseTest):
         super().setup()
         self.colpath = tempfile.mkdtemp()
         self.configuration.set("storage", "filesystem_folder", self.colpath)
+        # Disable syncing to disk for better performance
+        self.configuration.set("storage", "fsync", "False")
         self.application = Application(self.configuration, self.logger)
 
     def teardown(self):