Network GC test moved to regression suite

The network GC test is a long running test as it waits for
network.gc.wait + network.gc.interval * 2 to verify that the network
cleanups happen corectly. This test is also part of the regression suite
and is redundant in the smoke. The test run takes 30m longer because of
this test included in smoke.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
Prasanna Santhanam 2013-07-05 18:49:31 +05:30
parent 2d6301970e
commit d11681fb05
1 changed files with 0 additions and 94 deletions

View File

@ -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