test_freeze fails, possibly due to race condition

This commit is contained in:
Itai Shirav 2017-08-20 09:36:26 +03:00
parent 67e0442645
commit 59a4f1cecc

View File

@ -1,6 +1,6 @@
import unittest
from datetime import date
from time import sleep
import os
import shutil
from infi.clickhouse_orm.database import Database
@ -61,6 +61,7 @@ class SystemPartTest(unittest.TestCase):
# There can be other backups in the folder
prev_backups = set(self._get_backups())
parts[0].freeze()
sleep(1)
backups = set(self._get_backups())
self.assertEqual(len(backups), len(prev_backups) + 1)
# Clean created backup