Summary: Removing dbclient.close calls from integration tests

Detail:  Marvin auto-manages its connections now and there is no need to
call dbclient.close on tearDown of the test setup.

Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1351152797 +0530
This commit is contained in:
Prasanna Santhanam 2012-10-25 13:43:16 +05:30
parent 6a7215cedc
commit 5e451f899c
11 changed files with 1 additions and 35 deletions

View File

@ -407,7 +407,6 @@ class TestTemplate(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)

View File

@ -138,7 +138,6 @@ class TestDefaultSecurityGroupEgress(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -297,7 +296,6 @@ class TestAuthorizeIngressRule(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -455,7 +453,6 @@ class TestDefaultGroupEgress(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -656,7 +653,6 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -839,7 +835,6 @@ class TestRevokeEgressRule(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -1101,7 +1096,6 @@ class TestInvalidAccountAuthroize(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -1223,7 +1217,6 @@ class TestMultipleAccountsEgressRuleNeg(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -1471,7 +1464,6 @@ class TestMultipleAccountsEgressRule(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -1768,7 +1760,6 @@ class TestStartStopVMWithEgressRule(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -1980,7 +1971,6 @@ class TestInvalidParametersForEgress(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -2163,7 +2153,6 @@ class TestEgressAfterHostMaintainance(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)

View File

@ -176,7 +176,6 @@ class TestEIP(cloudstackTestCase):
try: try:
#Clean up, terminate the created network offerings #Clean up, terminate the created network offerings
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
self.dbclient.close()
except Exception as e: except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e) raise Exception("Warning: Exception during cleanup : %s" % e)
return return
@ -999,7 +998,6 @@ class TestELB(cloudstackTestCase):
try: try:
#Clean up, terminate the created network offerings #Clean up, terminate the created network offerings
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
self.dbclient.close()
except Exception as e: except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e) raise Exception("Warning: Exception during cleanup : %s" % e)
return return

View File

@ -1172,7 +1172,6 @@ class TestSecurityGroup(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)

View File

@ -110,7 +110,6 @@ class TestDefaultSecurityGroup(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -383,7 +382,6 @@ class TestAuthorizeIngressRule(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -519,7 +517,6 @@ class TestRevokeIngressRule(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -678,7 +675,6 @@ class TestDhcpOnlyRouter(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -815,7 +811,6 @@ class TestdeployVMWithUserData(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -1019,7 +1014,6 @@ class TestDeleteSecurityGroup(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -1265,7 +1259,6 @@ class TestIngressRule(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)

View File

@ -113,7 +113,6 @@ class TestCreateTemplate(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)

View File

@ -49,7 +49,6 @@ class TestCreateDiskOffering(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -112,7 +111,6 @@ class TestDiskOfferings(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)

View File

@ -109,7 +109,6 @@ class TestHosts(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -226,4 +225,4 @@ class TestHosts(cloudstackTestCase):
cluster.hypervisortype, cluster.hypervisortype,
"Check hypervisor type with is " + v["hypervisor"] + " or not" "Check hypervisor type with is " + v["hypervisor"] + " or not"
) )
return return

View File

@ -108,8 +108,6 @@ class TestCreateIso(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created ISOs #Clean up, terminate the created ISOs
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -247,7 +245,6 @@ class TestISO(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created ISOs, VMs #Clean up, terminate the created ISOs, VMs
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)

View File

@ -52,7 +52,6 @@ class TestCreateServiceOffering(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -132,7 +131,6 @@ class TestServiceOfferings(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)

View File

@ -112,7 +112,6 @@ class TestCreateTemplate(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)
@ -418,8 +417,6 @@ class TestTemplates(cloudstackTestCase):
def tearDown(self): def tearDown(self):
try: try:
self.dbclient.close()
#Clean up, terminate the created templates #Clean up, terminate the created templates
cleanup_resources(self.apiclient, self.cleanup) cleanup_resources(self.apiclient, self.cleanup)