Просмотр исходного кода

Disable syncing to disk for tests

This reduces test time by almost 70%.
Unrud 9 лет назад
Родитель
Сommit
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):