mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
test_vm_life_cycle: Don't wait a lot poll for change every expunge_cycle interval
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
1450547987
commit
a4c778e115
@ -869,11 +869,18 @@ class TestVMLifeCycle(cloudstackTestCase):
|
|||||||
if expunge_cycle < 600:
|
if expunge_cycle < 600:
|
||||||
expunge_cycle = 600
|
expunge_cycle = 600
|
||||||
|
|
||||||
time.sleep(expunge_cycle * 2)
|
wait_time = expunge_cycle * 2
|
||||||
|
while wait_time >= 0:
|
||||||
list_vm_response = list_virtual_machines(
|
list_vm_response = list_virtual_machines(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
id=self.small_virtual_machine.id
|
id=self.small_virtual_machine.id
|
||||||
)
|
)
|
||||||
|
if list_vm_response:
|
||||||
|
time.sleep(expunge_cycle)
|
||||||
|
wait_time = wait_time - expunge_cycle
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list_vm_response,
|
list_vm_response,
|
||||||
None,
|
None,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user