Skip to content

Commit 5e451f8

Browse files
author
Prasanna Santhanam
committed
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
1 parent 6a7215c commit 5e451f8

11 files changed

Lines changed: 1 addition & 35 deletions

‎test/integration/component/test_blocker_bugs.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,6 @@ def setUp(self):
407407

408408
def tearDown(self):
409409
try:
410-
self.dbclient.close()
411410
#Clean up, terminate the created templates
412411
cleanup_resources(self.apiclient, self.cleanup)
413412

‎test/integration/component/test_egress_rules.py‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ def setUp(self):
138138

139139
def tearDown(self):
140140
try:
141-
self.dbclient.close()
142141
#Clean up, terminate the created templates
143142
cleanup_resources(self.apiclient, self.cleanup)
144143

@@ -297,7 +296,6 @@ def setUp(self):
297296

298297
def tearDown(self):
299298
try:
300-
self.dbclient.close()
301299
#Clean up, terminate the created templates
302300
cleanup_resources(self.apiclient, self.cleanup)
303301

@@ -455,7 +453,6 @@ def setUp(self):
455453

456454
def tearDown(self):
457455
try:
458-
self.dbclient.close()
459456
#Clean up, terminate the created templates
460457
cleanup_resources(self.apiclient, self.cleanup)
461458

@@ -656,7 +653,6 @@ def setUp(self):
656653

657654
def tearDown(self):
658655
try:
659-
self.dbclient.close()
660656
#Clean up, terminate the created templates
661657
cleanup_resources(self.apiclient, self.cleanup)
662658

@@ -839,7 +835,6 @@ def setUp(self):
839835

840836
def tearDown(self):
841837
try:
842-
self.dbclient.close()
843838
#Clean up, terminate the created templates
844839
cleanup_resources(self.apiclient, self.cleanup)
845840

@@ -1101,7 +1096,6 @@ def setUp(self):
11011096

11021097
def tearDown(self):
11031098
try:
1104-
self.dbclient.close()
11051099
#Clean up, terminate the created templates
11061100
cleanup_resources(self.apiclient, self.cleanup)
11071101

@@ -1223,7 +1217,6 @@ def setUp(self):
12231217

12241218
def tearDown(self):
12251219
try:
1226-
self.dbclient.close()
12271220
#Clean up, terminate the created templates
12281221
cleanup_resources(self.apiclient, self.cleanup)
12291222

@@ -1471,7 +1464,6 @@ def setUp(self):
14711464

14721465
def tearDown(self):
14731466
try:
1474-
self.dbclient.close()
14751467
#Clean up, terminate the created templates
14761468
cleanup_resources(self.apiclient, self.cleanup)
14771469

@@ -1768,7 +1760,6 @@ def setUp(self):
17681760

17691761
def tearDown(self):
17701762
try:
1771-
self.dbclient.close()
17721763
#Clean up, terminate the created templates
17731764
cleanup_resources(self.apiclient, self.cleanup)
17741765

@@ -1980,7 +1971,6 @@ def setUp(self):
19801971

19811972
def tearDown(self):
19821973
try:
1983-
self.dbclient.close()
19841974
#Clean up, terminate the created templates
19851975
cleanup_resources(self.apiclient, self.cleanup)
19861976

@@ -2163,7 +2153,6 @@ def setUp(self):
21632153

21642154
def tearDown(self):
21652155
try:
2166-
self.dbclient.close()
21672156
#Clean up, terminate the created templates
21682157
cleanup_resources(self.apiclient, self.cleanup)
21692158

‎test/integration/component/test_eip_elb.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ def tearDown(self):
176176
try:
177177
#Clean up, terminate the created network offerings
178178
cleanup_resources(self.apiclient, self.cleanup)
179-
self.dbclient.close()
180179
except Exception as e:
181180
raise Exception("Warning: Exception during cleanup : %s" % e)
182181
return
@@ -999,7 +998,6 @@ def tearDown(self):
999998
try:
1000999
#Clean up, terminate the created network offerings
10011000
cleanup_resources(self.apiclient, self.cleanup)
1002-
self.dbclient.close()
10031001
except Exception as e:
10041002
raise Exception("Warning: Exception during cleanup : %s" % e)
10051003
return

‎test/integration/component/test_project_resources.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,6 @@ def setUp(self):
11721172

11731173
def tearDown(self):
11741174
try:
1175-
self.dbclient.close()
11761175
#Clean up, terminate the created templates
11771176
cleanup_resources(self.apiclient, self.cleanup)
11781177

‎test/integration/component/test_security_groups.py‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ def setUp(self):
110110

111111
def tearDown(self):
112112
try:
113-
self.dbclient.close()
114113
#Clean up, terminate the created templates
115114
cleanup_resources(self.apiclient, self.cleanup)
116115

@@ -383,7 +382,6 @@ def setUp(self):
383382

384383
def tearDown(self):
385384
try:
386-
self.dbclient.close()
387385
#Clean up, terminate the created templates
388386
cleanup_resources(self.apiclient, self.cleanup)
389387

@@ -519,7 +517,6 @@ def setUp(self):
519517

520518
def tearDown(self):
521519
try:
522-
self.dbclient.close()
523520
#Clean up, terminate the created templates
524521
cleanup_resources(self.apiclient, self.cleanup)
525522

@@ -678,7 +675,6 @@ def setUp(self):
678675

679676
def tearDown(self):
680677
try:
681-
self.dbclient.close()
682678
#Clean up, terminate the created templates
683679
cleanup_resources(self.apiclient, self.cleanup)
684680

@@ -815,7 +811,6 @@ def setUp(self):
815811

816812
def tearDown(self):
817813
try:
818-
self.dbclient.close()
819814
#Clean up, terminate the created templates
820815
cleanup_resources(self.apiclient, self.cleanup)
821816

@@ -1019,7 +1014,6 @@ def setUp(self):
10191014

10201015
def tearDown(self):
10211016
try:
1022-
self.dbclient.close()
10231017
#Clean up, terminate the created templates
10241018
cleanup_resources(self.apiclient, self.cleanup)
10251019

@@ -1265,7 +1259,6 @@ def setUp(self):
12651259

12661260
def tearDown(self):
12671261
try:
1268-
self.dbclient.close()
12691262
#Clean up, terminate the created templates
12701263
cleanup_resources(self.apiclient, self.cleanup)
12711264

‎test/integration/component/test_templates.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ def setUp(self):
113113

114114
def tearDown(self):
115115
try:
116-
self.dbclient.close()
117116
#Clean up, terminate the created templates
118117
cleanup_resources(self.apiclient, self.cleanup)
119118

‎test/integration/smoke/test_disk_offerings.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def setUp(self):
4949

5050
def tearDown(self):
5151
try:
52-
self.dbclient.close()
5352
#Clean up, terminate the created templates
5453
cleanup_resources(self.apiclient, self.cleanup)
5554

@@ -112,7 +111,6 @@ def setUp(self):
112111
def tearDown(self):
113112

114113
try:
115-
self.dbclient.close()
116114
#Clean up, terminate the created templates
117115
cleanup_resources(self.apiclient, self.cleanup)
118116

‎test/integration/smoke/test_hosts.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ def setUp(self):
109109

110110
def tearDown(self):
111111
try:
112-
self.dbclient.close()
113112
#Clean up, terminate the created templates
114113
cleanup_resources(self.apiclient, self.cleanup)
115114

@@ -226,4 +225,4 @@ def test_01_clusters(self):
226225
cluster.hypervisortype,
227226
"Check hypervisor type with is " + v["hypervisor"] + " or not"
228227
)
229-
return
228+
return

‎test/integration/smoke/test_iso.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ def setUp(self):
108108

109109
def tearDown(self):
110110
try:
111-
112-
self.dbclient.close()
113111
#Clean up, terminate the created ISOs
114112
cleanup_resources(self.apiclient, self.cleanup)
115113

@@ -247,7 +245,6 @@ def setUp(self):
247245

248246
def tearDown(self):
249247
try:
250-
self.dbclient.close()
251248
#Clean up, terminate the created ISOs, VMs
252249
cleanup_resources(self.apiclient, self.cleanup)
253250

‎test/integration/smoke/test_service_offerings.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def setUp(self):
5252

5353
def tearDown(self):
5454
try:
55-
self.dbclient.close()
5655
#Clean up, terminate the created templates
5756
cleanup_resources(self.apiclient, self.cleanup)
5857

@@ -132,7 +131,6 @@ def setUp(self):
132131
def tearDown(self):
133132

134133
try:
135-
self.dbclient.close()
136134
#Clean up, terminate the created templates
137135
cleanup_resources(self.apiclient, self.cleanup)
138136

0 commit comments

Comments
 (0)