Commit 13f807dd 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 a643eb82
Pipeline #11501 running with stage
in 0 seconds
......@@ -653,7 +653,8 @@ class SlapOSInstanceTestCase(unittest.TestCase):
cls._storeSystemSnapshot(
"{}._cleanup request destroy".format(snapshot_name))
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:
cls.logger.exception("Error during actual destruction")
cls._storeSystemSnapshot(
......@@ -684,7 +685,8 @@ class SlapOSInstanceTestCase(unittest.TestCase):
"{}._cleanup leaked_partitions request destruction".format(
snapshot_name))
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:
cls.logger.exception(
"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