diff --git a/test/integration/smoke/test_routers.py b/test/integration/smoke/test_routers.py index 22de29bed72..49c4969adf0 100644 --- a/test/integration/smoke/test_routers.py +++ b/test/integration/smoke/test_routers.py @@ -789,97 +789,3 @@ class TestRouterServices(cloudstackTestCase): "Check list router response for router public IP" ) return - - @attr(configuration = "network.gc") - @attr(tags = ["advanced", "advancedns", "smoke"]) - def test_10_network_gc(self): - """Test network GC - """ - - # Validate the following - # 1. stop All User VMs in the account - # 2. wait for network.gc.interval time" - # 3. After network.gc.interval, router should be stopped - # 4. ListRouters should return the router in Stopped state - - list_vms = list_virtual_machines( - self.apiclient, - account=self.account.name, - domainid=self.account.domainid - ) - self.assertEqual( - isinstance(list_vms, list), - True, - "Check list response returns a valid list" - ) - self.assertNotEqual( - len(list_vms), - 0, - "Check length of list VM response" - ) - - for vm in list_vms: - self.debug("Stopping the VM with ID: %s" % vm.id) - # Stop all virtual machines associated with that account - cmd = stopVirtualMachine.stopVirtualMachineCmd() - cmd.id = vm.id - self.apiclient.stopVirtualMachine(cmd) - - # Get network.gc.interval config value - config = list_configurations( - self.apiclient, - name='network.gc.interval' - ) - self.assertEqual( - isinstance(config, list), - True, - "Check list response returns a valid list" - ) - gcinterval = config[0] - - # Get network.gc.wait config value - config = list_configurations( - self.apiclient, - name='network.gc.wait' - ) - self.assertEqual( - isinstance(config, list), - True, - "Check list response returns a valid list" - ) - gcwait = config[0] - - total_wait = int(gcinterval.value) + int(gcwait.value) - self.debug("Waiting %s seconds for network cleanup" % str(total_wait * 2)) - # Wait for wait_time * 2 time to cleanup all the resources - time.sleep(total_wait * 2) - - timeout = self.services["timeout"] - while True: - #Check status of network router - list_router_response = list_routers( - self.apiclient, - account=self.account.name, - domainid=self.account.domainid - ) - if isinstance(list_router_response, list): - break - elif timeout == 0: - raise Exception("List router call failed!") - time.sleep(5) - timeout = timeout -1 - - self.assertEqual( - isinstance(list_router_response, list), - True, - "Check list response returns a valid list" - ) - router = list_router_response[0] - - self.debug("Router state after network.gc.interval: %s" % router.state) - self.assertEqual( - router.state, - 'Stopped', - "Check state of the router after stopping all VMs associated" - ) - return