Commit 90cad43d authored by Nicolas Wavrant's avatar Nicolas Wavrant

resiliencytestsuite: try to find a stable state to test promises

parent dc9acdcc
...@@ -169,6 +169,10 @@ class ResiliencyTestSuite(object): ...@@ -169,6 +169,10 @@ class ResiliencyTestSuite(object):
)) ))
time.sleep(self.sleep_time_between_test) time.sleep(self.sleep_time_between_test)
# Before doing takeover we expect the instances to be in a stable state
if not self._testPromises():
return False
self.logger.info('Testing %s%s instance.' % (self.namebase, clone)) self.logger.info('Testing %s%s instance.' % (self.namebase, clone))
self._doTakeover(self.namebase, clone) self._doTakeover(self.namebase, clone)
...@@ -192,14 +196,7 @@ class ResiliencyTestSuite(object): ...@@ -192,14 +196,7 @@ class ResiliencyTestSuite(object):
success = self.checkDataOnCloneInstance() success = self.checkDataOnCloneInstance()
if success: if success:
self.logger.info( return True
'Sleeping for %s seconds that new clone is set up.' % self.sleep_time_between_test
)
time.sleep(self.sleep_time_between_test)
return success and self._testPromises()
return False
def _testPromises(self): def _testPromises(self):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment