From fbf057a3236dcce96c0f08b419963831e411c243 Mon Sep 17 00:00:00 2001 From: Girish Shilamkar Date: Sun, 6 Oct 2013 18:01:43 -0400 Subject: [PATCH] CLOUDSTACK-4262: Fix TestVPCNetworkGc.test_01_wait_network_gc As per the test plan, after waiting for network gc LB rules should be cleared. Added that check instead of router being in stopped state. Signed-off-by: venkataswamybabu budumuru (cherry picked from commit abdb84bb05abc9f2bd102bca1c1b34865f34d771) --- .../integration/component/test_vpc_network.py | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/test/integration/component/test_vpc_network.py b/test/integration/component/test_vpc_network.py index 420c05a3212..ffd41a28d5d 100644 --- a/test/integration/component/test_vpc_network.py +++ b/test/integration/component/test_vpc_network.py @@ -2382,26 +2382,16 @@ class TestVPCNetworkGc(cloudstackTestCase): self.debug("Waiting for network garbage collection thread to run") # Wait for the network garbage collection thread to run wait_for_cleanup(self.apiclient, - ["network.gc.interval", "network.gc.wait"]*2) - self.debug("Check if the VPC router is in stopped state?") - routers = Router.list( - self.apiclient, - account=self.account.name, - domainid=self.account.domainid, - listall=True - ) - self.assertEqual( - isinstance(routers, list), - True, - "List routers shall return a valid response" - ) - router = routers[0] - # TODO: Add some more assertions - self.assertEqual( - router.state, - "Stopped", - "Router state should be stopped after network gc" - ) + ["network.gc.interval", "network.gc.wait"]) + + #Bug???: Network Acls are not cleared + netacls = NetworkACL.list(self.apiclient, networkid=self.network_1.id) + self.debug("List of NetACLS %s" % netacls) + self.assertEqual(netacls, None, "Netacls were not cleared after network GC thread is run") + + lbrules = LoadBalancerRule.list(self.apiclient, networkid=self.network_1.id) + self.debug("List of LB Rules %s" % lbrules) + self.assertEqual(lbrules, None, "LBrules were not cleared after network GC thread is run") return @attr(tags=["advanced", "intervlan"])