@@ -94,6 +94,9 @@ public void test1CreateFirstOperatorAndDomain() throws Exception {
94
94
logTestBegin ("test1CreateFirstOperatorAndDomain" );
95
95
testCreateOperatorManagingDefaultAndTest1NS ();
96
96
domain1 = testAllUseCasesForADomain (operator1 , domain1YamlFile );
97
+ domain1 .testWlsLivenessProbe ();
98
+ domain1 .destroy ();
99
+
97
100
logger .info ("SUCCESS - test1CreateFirstOperatorAndDomain" );
98
101
}
99
102
@@ -128,6 +131,7 @@ public void test3CreateDomainInTest1NS() throws Exception {
128
131
// create domain3
129
132
Domain domain3 = testDomainCreation (domain3YamlFile );
130
133
testWLDFScaling (operator1 , domain3 );
134
+ domain3 .destroy ();
131
135
logger .info ("SUCCESS - test3CreateDomainInTest1NS" );
132
136
}
133
137
@@ -157,6 +161,8 @@ public void test5CreateConfiguredDomainInTest2NS() throws Exception {
157
161
}
158
162
if (domain1 == null ) {
159
163
domain1 = TestUtils .createDomain (domain1YamlFile );
164
+ } else {
165
+ domain1 .create ();
160
166
}
161
167
logger .info ("Checking if operator2 is running, if not creating" );
162
168
if (operator2 == null ) {
@@ -179,6 +185,8 @@ public void test5CreateConfiguredDomainInTest2NS() throws Exception {
179
185
180
186
logger .info ("Verify no impact on domain4" );
181
187
domain4 .verifyDomainCreated ();
188
+ domain4 .destroy ();
189
+ domain1 .destroy ();
182
190
logger .info ("SUCCESS - test5CreateConfiguredDomainInTest2NS" );
183
191
}
184
192
@@ -194,7 +202,8 @@ public void test6CreateDomainWithStartPolicyAdminOnly() throws Exception {
194
202
}
195
203
logger .info ("Creating Domain domain5 & verifing the domain creation" );
196
204
// create domain5
197
- TestUtils .createDomain (domain5YamlFile );
205
+ Domain domain5 = TestUtils .createDomain (domain5YamlFile );
206
+ domain5 .destroy ();
198
207
logger .info ("SUCCESS - test6CreateDomainWithStartPolicyAdminOnly" );
199
208
}
200
209
@@ -216,25 +225,6 @@ public void test7CreateDomainPVReclaimPolicyRecycle() throws Exception {
216
225
logger .info ("SUCCESS - test7CreateDomainPVReclaimPolicyRecycle" );
217
226
}
218
227
219
- @ Test
220
- public void test8WlsLivenessProbe () throws Exception {
221
-
222
- logTestBegin ("test8WlsLivenessProbe" );
223
- logger .info ("Checking if operator1 is running, if not creating" );
224
- if (operator1 == null ) {
225
- operator1 = TestUtils .createOperator (op1YamlFile );
226
- }
227
- if (domain1 == null ) {
228
- domain1 = TestUtils .createDomain (domain1YamlFile );
229
- }
230
- // test managed server1 pod auto restart
231
- String domain = domain1 .getDomainUid ();
232
- String namespace = domain1 .getDomainMap ().get ("namespace" ).toString ();
233
- String serverName = domain1 .getDomainMap ().get ("managedServerNameBase" ).toString () + "1" ;
234
- TestUtils .testWlsLivenessProbe (domain , serverName , namespace );
235
- logger .info ("SUCCESS - test8WlsLivenessProbe" );
236
- }
237
-
238
228
@ Test
239
229
public void test9CreateDomainOnExistingDir () throws Exception {
240
230
Assume .assumeFalse (
@@ -246,10 +236,10 @@ public void test9CreateDomainOnExistingDir() throws Exception {
246
236
}
247
237
if (domain1 == null ) {
248
238
domain1 = TestUtils .createDomain (domain1YamlFile );
239
+ // create domain on existing dir
240
+ domain1 .destroy ();
249
241
}
250
242
logger .info ("domain1 " + domain1 );
251
- // create domain on existing dir
252
- domain1 .destroy ();
253
243
domain1 .createDomainOnExistingDirectory ();
254
244
logger .info ("SUCCESS - test9CreateDomainOnExistingDir" );
255
245
}
@@ -267,6 +257,7 @@ public void testACreateDomainApacheLB() throws Exception {
267
257
// create domain7
268
258
Domain domain7 = TestUtils .createDomain (domain7YamlFile );
269
259
domain7 .verifyAdminConsoleViaLB ();
260
+ domain7 .destroy ();
270
261
logger .info ("SUCCESS - testACreateDomainApacheLB" );
271
262
}
272
263
@@ -281,7 +272,8 @@ public void testBCreateDomainWithDefaultValuesInSampleInputs() throws Exception
281
272
}
282
273
283
274
// create domain8
284
- testAllUseCasesForADomain (operator1 , domain8YamlFile );
275
+ Domain domain8 = testAllUseCasesForADomain (operator1 , domain8YamlFile );
276
+ domain8 .destroy ();
285
277
logger .info ("SUCCESS - testBCreateDomainWithDefaultValuesInSampleInputs" );
286
278
}
287
279
0 commit comments