]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix unittest failure in radware lbaas driver
authorEugene Nikanorov <enikanorov@mirantis.com>
Wed, 12 Mar 2014 08:35:45 +0000 (12:35 +0400)
committerEugene Nikanorov <enikanorov@mirantis.com>
Wed, 12 Mar 2014 08:36:26 +0000 (12:36 +0400)
Wait for vip delete completion before deleting network
and subnet.
Also fix indentation in the driver

Closes-Bug: #1288312
Change-Id: I88b3252102d6c4a60bbadf2951bbb74fcd19792b

neutron/services/loadbalancer/drivers/radware/driver.py
neutron/tests/unit/services/loadbalancer/drivers/radware/test_plugin_driver.py

index e639d0adfd911429169edb029f949440f74ff60e..dae5d144548009df6a6bbdcf120ba617eec17388 100644 (file)
@@ -651,8 +651,8 @@ class OperationCompletionHandler(threading.Thread):
 
                 LOG.debug('Operation consumed from the queue: ' +
                           str(oper))
-                 # check the status - if oper is done: update the db ,
-                 # else push the oper again to the queue
+                # check the status - if oper is done: update the db ,
+                # else push the oper again to the queue
                 result = self.rest_client.call('GET',
                                                oper.operation_url,
                                                None,
index 1c0bf1f71a0f017dadcafc3ed02ea9fc224daff2..bdcfc805ec82e4f0cf2c00a4ae5ac6cbc5505ef4 100644 (file)
@@ -232,8 +232,8 @@ class TestLoadBalancerPlugin(TestLoadBalancerPluginBase):
                               None, None)
                 ]
                 self.rest_call_mock.assert_has_calls(calls, any_order=True)
-                # need to switch greenthreads in order to let driver delete vip
-                eventlet.greenthread.sleep(0)
+                # need to wait some time to allow driver to delete vip
+                eventlet.greenthread.sleep(1)
 
     def test_update_vip(self):
         self.rest_call_mock.reset_mock()