Commit 846a829e authored by Jérome Perrin's avatar Jérome Perrin

testing/testcase: run `slapos node report` at least 3 times

In a scenario of an instance with child instances which does not properly
support destruction, a scenario like this happens:

 1. first report detect that it's destroying a root partition but child
partitions are still started and request destruction of these child instances
 2. child partitions are destroyed
 3. root partition is destroyed

For this case we need to run 3 times
parent a58c14b0
...@@ -653,7 +653,8 @@ class SlapOSInstanceTestCase(unittest.TestCase): ...@@ -653,7 +653,8 @@ class SlapOSInstanceTestCase(unittest.TestCase):
cls._storeSystemSnapshot( cls._storeSystemSnapshot(
"{}._cleanup request destroy".format(snapshot_name)) "{}._cleanup request destroy".format(snapshot_name))
try: try:
cls.slap.waitForReport(max_retry=cls.report_max_retry, debug=cls._debug) for _ in range(3):
cls.slap.waitForReport(max_retry=cls.report_max_retry, debug=cls._debug)
except: except:
cls.logger.exception("Error during actual destruction") cls.logger.exception("Error during actual destruction")
cls._storeSystemSnapshot( cls._storeSystemSnapshot(
...@@ -684,7 +685,8 @@ class SlapOSInstanceTestCase(unittest.TestCase): ...@@ -684,7 +685,8 @@ class SlapOSInstanceTestCase(unittest.TestCase):
"{}._cleanup leaked_partitions request destruction".format( "{}._cleanup leaked_partitions request destruction".format(
snapshot_name)) snapshot_name))
try: try:
cls.slap.waitForReport(max_retry=cls.report_max_retry, debug=cls._debug) for _ in range(3):
cls.slap.waitForReport(max_retry=cls.report_max_retry, debug=cls._debug)
except: except:
cls.logger.exception( cls.logger.exception(
"Error during leaked partitions actual destruction") "Error during leaked partitions actual destruction")
......
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