Skip to content

Commit dbdd0c7

Browse files
committed
test: sleep 10 seconds before attaching volume in test_events_resource.py
1 parent 09fca9b commit dbdd0c7

1 file changed

Lines changed: 6 additions & 14 deletions

File tree

test/integration/smoke/test_events_resource.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -147,25 +147,17 @@ def test_01_events_resource(self):
147147
diskofferingid=self.disk_offering.id
148148
)
149149
self.cleanup.append(volume)
150-
try:
151-
virtual_machine.attach_volume(
152-
self.apiclient,
153-
volume
154-
)
155-
except Exception as e:
156-
print("Failed to attach volume to VM: %s" % e)
157-
pass
158-
150+
time.sleep(10)
151+
virtual_machine.attach_volume(
152+
self.apiclient,
153+
volume
154+
)
159155
virtual_machine.stop(self.apiclient)
160156
account_network.restart(self.apiclient, cleanup=False)
161157
time.sleep(self.services["sleep"])
162158
virtual_machine.restore(self.apiclient)
163159
time.sleep(self.services["sleep"])
164-
try:
165-
virtual_machine.detach_volume(self.apiclient, volume)
166-
except Exception as e:
167-
print("Failed to detach volume from VM: %s" % e)
168-
pass
160+
virtual_machine.detach_volume(self.apiclient, volume)
169161
volume.delete(self.apiclient)
170162
self.cleanup.remove(volume)
171163
ts = str(time.time())

0 commit comments

Comments
 (0)