summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Pisarski <s.pisarski@cablelabs.com>2018-02-01 14:33:22 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-02-01 14:33:22 +0000
commit9cf59ae0a133b0c8ab3907c84ec3c7b962df599a (patch)
tree8dac467e37d276f7d0af0ac13ab3c176f191fd31
parentf6e61167b445bfd965feca5a9dee626e3735837d (diff)
parent011c8254e9f9c6f586d8416aaf8be6f807e77e15 (diff)
Merge "openstack: nova_utils_tests: Use API timeout argument instead of sleep()"
-rw-r--r--snaps/openstack/utils/tests/nova_utils_tests.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/snaps/openstack/utils/tests/nova_utils_tests.py b/snaps/openstack/utils/tests/nova_utils_tests.py
index 8cb0812..77dc5dd 100644
--- a/snaps/openstack/utils/tests/nova_utils_tests.py
+++ b/snaps/openstack/utils/tests/nova_utils_tests.py
@@ -451,9 +451,7 @@ class NovaUtilsInstanceVolumeTests(OSComponentTestCase):
neutron = neutron_utils.neutron_client(self.os_creds)
nova_utils.attach_volume(
self.nova, neutron, self.instance_creator.get_vm_inst(),
- self.volume_creator.get_volume())
-
- time.sleep(10)
+ self.volume_creator.get_volume(), 120)
vol_attach = cinder_utils.get_volume_by_id(
self.cinder, self.volume_creator.get_volume().id)
@@ -463,9 +461,7 @@ class NovaUtilsInstanceVolumeTests(OSComponentTestCase):
# Detach volume to VM
nova_utils.detach_volume(
self.nova, neutron, self.instance_creator.get_vm_inst(),
- self.volume_creator.get_volume())
-
- time.sleep(10)
+ self.volume_creator.get_volume(), 120)
vol_detach = cinder_utils.get_volume_by_id(
self.cinder, self.volume_creator.get_volume().id)