@@ -159,6 +159,9 @@ public void testJRFDomainClusterRestartVersion() throws Exception {
159
159
+ ", got: "
160
160
+ getMSPodsCount (domain1 ));
161
161
}
162
+
163
+ testCompletedSuccessfully = true ;
164
+
162
165
} finally {
163
166
if (domain1 != null && (JENKINS || testCompletedSuccessfully )) {
164
167
domain1 .destroy ();
@@ -204,6 +207,8 @@ public void testJRFDomainMSPodCreated() throws Exception {
204
207
domain1 = new JRFDomain (domain1Map );
205
208
domain1 .verifyDomainCreated ();
206
209
210
+ testCompletedSuccessfully = true ;
211
+
207
212
} finally {
208
213
if (domain1 != null && (JENKINS || testCompletedSuccessfully )) {
209
214
domain1 .destroy ();
@@ -249,6 +254,8 @@ public void testJRFDomainCreateDomainScriptsMountPath() throws Exception {
249
254
domain1 = new JRFDomain (domain1Map );
250
255
domain1 .verifyDomainCreated ();
251
256
257
+ testCompletedSuccessfully = true ;
258
+
252
259
} finally {
253
260
if (domain1 != null && (JENKINS || testCompletedSuccessfully )) {
254
261
domain1 .destroy ();
@@ -295,6 +302,8 @@ public void testJRFDomainAdminPortEnabled() throws Exception {
295
302
domain1 = new JRFDomain (domain1Map , true );
296
303
domain1 .verifyDomainCreated ();
297
304
305
+ testCompletedSuccessfully = true ;
306
+
298
307
} finally {
299
308
if (domain1 != null && (JENKINS || testCompletedSuccessfully )) {
300
309
domain1 .destroy ();
@@ -339,6 +348,9 @@ public void testJRFDomainAdminT3Channel() throws Exception {
339
348
340
349
// verify the Admin T3Channel is exposed
341
350
testAdminT3Channel (domain1 );
351
+
352
+ testCompletedSuccessfully = true ;
353
+
342
354
} finally {
343
355
if (domain1 != null && (JENKINS || testCompletedSuccessfully )) {
344
356
domain1 .destroy ();
@@ -400,12 +412,13 @@ private void verifyMSPodsNotReadyCountNotExceedMaxUnAvailable(
400
412
*/
401
413
private int getMSPodsNotReadyCount (JRFDomain domain ) throws Exception {
402
414
415
+ String domainuid = (String ) domain .getDomainMap ().get ("domainUID" );
403
416
String managedServerNameBase = (String ) domain .getDomainMap ().get ("managedServerNameBase" );
404
417
StringBuffer cmd = new StringBuffer ();
405
418
cmd .append ("kubectl get pods -n " )
406
419
.append (domain .getDomainNS ())
407
420
.append (" | grep " )
408
- .append (managedServerNameBase )
421
+ .append (domainuid + "-" + managedServerNameBase )
409
422
.append (" | grep 0/1 | wc -l" );
410
423
ExecResult result = TestUtils .exec (cmd .toString ());
411
424
@@ -421,12 +434,13 @@ private int getMSPodsNotReadyCount(JRFDomain domain) throws Exception {
421
434
*/
422
435
private int getMSPodsRunningAndReadyCount (JRFDomain domain ) throws Exception {
423
436
437
+ String domainuid = (String ) domain .getDomainMap ().get ("domainUID" );
424
438
String managedServerNameBase = (String ) domain .getDomainMap ().get ("managedServerNameBase" );
425
439
StringBuffer cmd = new StringBuffer ();
426
440
cmd .append ("kubectl get pods -n " )
427
441
.append (domain .getDomainNS ())
428
442
.append (" | grep " )
429
- .append (managedServerNameBase )
443
+ .append (domainuid + "-" + managedServerNameBase )
430
444
.append (" | grep 1/1 | grep Running | wc -l" );
431
445
ExecResult result = TestUtils .exec (cmd .toString ());
432
446
@@ -441,12 +455,13 @@ private int getMSPodsRunningAndReadyCount(JRFDomain domain) throws Exception {
441
455
* @throws Exception - if any error occurs
442
456
*/
443
457
private int getMSPodsCount (JRFDomain domain ) throws Exception {
458
+ String domainuid = (String ) domain .getDomainMap ().get ("domainUID" );
444
459
String managedServerNameBase = (String ) domain .getDomainMap ().get ("managedServerNameBase" );
445
460
StringBuffer cmd = new StringBuffer ();
446
461
cmd .append ("kubectl get pods -n " )
447
462
.append (domain .getDomainNS ())
448
463
.append (" | grep " )
449
- .append (managedServerNameBase )
464
+ .append (domainuid + "-" + managedServerNameBase )
450
465
.append (" | wc -l" );
451
466
ExecResult result = TestUtils .exec (cmd .toString ());
452
467
0 commit comments