mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	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:
		
							parent
							
								
									6a7215cedc
								
							
						
					
					
						commit
						5e451f899c
					
				| @ -407,7 +407,6 @@ class TestTemplate(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
|  | ||||
| @ -138,7 +138,6 @@ class TestDefaultSecurityGroupEgress(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -297,7 +296,6 @@ class TestAuthorizeIngressRule(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -455,7 +453,6 @@ class TestDefaultGroupEgress(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -656,7 +653,6 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -839,7 +835,6 @@ class TestRevokeEgressRule(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -1101,7 +1096,6 @@ class TestInvalidAccountAuthroize(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -1223,7 +1217,6 @@ class TestMultipleAccountsEgressRuleNeg(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -1471,7 +1464,6 @@ class TestMultipleAccountsEgressRule(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -1768,7 +1760,6 @@ class TestStartStopVMWithEgressRule(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -1980,7 +1971,6 @@ class TestInvalidParametersForEgress(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -2163,7 +2153,6 @@ class TestEgressAfterHostMaintainance(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
|  | ||||
| @ -176,7 +176,6 @@ class TestEIP(cloudstackTestCase): | ||||
|         try: | ||||
|             #Clean up, terminate the created network offerings | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
|             self.dbclient.close() | ||||
|         except Exception as e: | ||||
|             raise Exception("Warning: Exception during cleanup : %s" % e) | ||||
|         return | ||||
| @ -999,7 +998,6 @@ class TestELB(cloudstackTestCase): | ||||
|         try: | ||||
|             #Clean up, terminate the created network offerings | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
|             self.dbclient.close() | ||||
|         except Exception as e: | ||||
|             raise Exception("Warning: Exception during cleanup : %s" % e) | ||||
|         return | ||||
|  | ||||
| @ -1172,7 +1172,6 @@ class TestSecurityGroup(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
|  | ||||
| @ -110,7 +110,6 @@ class TestDefaultSecurityGroup(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -383,7 +382,6 @@ class TestAuthorizeIngressRule(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -519,7 +517,6 @@ class TestRevokeIngressRule(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -678,7 +675,6 @@ class TestDhcpOnlyRouter(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -815,7 +811,6 @@ class TestdeployVMWithUserData(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -1019,7 +1014,6 @@ class TestDeleteSecurityGroup(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -1265,7 +1259,6 @@ class TestIngressRule(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
|  | ||||
| @ -113,7 +113,6 @@ class TestCreateTemplate(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
|  | ||||
| @ -49,7 +49,6 @@ class TestCreateDiskOffering(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -112,7 +111,6 @@ class TestDiskOfferings(cloudstackTestCase): | ||||
|     def tearDown(self): | ||||
| 
 | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
|  | ||||
| @ -109,7 +109,6 @@ class TestHosts(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
|  | ||||
| @ -108,8 +108,6 @@ class TestCreateIso(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
| 
 | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created ISOs | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -247,7 +245,6 @@ class TestISO(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created ISOs, VMs | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
|  | ||||
| @ -52,7 +52,6 @@ class TestCreateServiceOffering(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -132,7 +131,6 @@ class TestServiceOfferings(cloudstackTestCase): | ||||
|     def tearDown(self): | ||||
| 
 | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
|  | ||||
| @ -112,7 +112,6 @@ class TestCreateTemplate(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
| @ -418,8 +417,6 @@ class TestTemplates(cloudstackTestCase): | ||||
| 
 | ||||
|     def tearDown(self): | ||||
|         try: | ||||
| 
 | ||||
|             self.dbclient.close() | ||||
|             #Clean up, terminate the created templates | ||||
|             cleanup_resources(self.apiclient, self.cleanup) | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user