Fix fullstack error about one test
This fullstack test 'test_scheduled_operations_create_and_scheduled' failed sometimes. The reason is that the sleep_time calculation is not exact. The start_time is earlier than the value as expected. We also need consider the time about checkpoint API execution. Change-Id: I2ca67d3b2cf1a68b58028212b92467fcc8217caf
This commit is contained in:
parent
fa19fd9565
commit
4c7e2d3c63
|
@ -109,8 +109,8 @@ class ScheduledOperationsTest(karbor_base.KarborBaseTest):
|
|||
pattern = '*/5 * * * *'
|
||||
cur_property = {'pattern': pattern, 'format': 'crontab'}
|
||||
|
||||
start_time = datetime.now().replace(microsecond=0)
|
||||
operation = self.store(self._create_for_volume(cur_property))
|
||||
start_time = datetime.now().replace(microsecond=0)
|
||||
sleep_time = self._wait_timestamp(pattern, start_time, freq)
|
||||
self.assertNotEqual(0, sleep_time)
|
||||
eventlet.sleep(sleep_time)
|
||||
|
|
Loading…
Reference in New Issue