@@ -159,6 +159,9 @@ public void testJRFDomainClusterRestartVersion() throws Exception {
159159 + ", got: "
160160 + getMSPodsCount (domain1 ));
161161 }
162+
163+ testCompletedSuccessfully = true ;
164+
162165 } finally {
163166 if (domain1 != null && (JENKINS || testCompletedSuccessfully )) {
164167 domain1 .destroy ();
@@ -204,6 +207,8 @@ public void testJRFDomainMSPodCreated() throws Exception {
204207 domain1 = new JRFDomain (domain1Map );
205208 domain1 .verifyDomainCreated ();
206209
210+ testCompletedSuccessfully = true ;
211+
207212 } finally {
208213 if (domain1 != null && (JENKINS || testCompletedSuccessfully )) {
209214 domain1 .destroy ();
@@ -249,6 +254,8 @@ public void testJRFDomainCreateDomainScriptsMountPath() throws Exception {
249254 domain1 = new JRFDomain (domain1Map );
250255 domain1 .verifyDomainCreated ();
251256
257+ testCompletedSuccessfully = true ;
258+
252259 } finally {
253260 if (domain1 != null && (JENKINS || testCompletedSuccessfully )) {
254261 domain1 .destroy ();
@@ -295,6 +302,8 @@ public void testJRFDomainAdminPortEnabled() throws Exception {
295302 domain1 = new JRFDomain (domain1Map , true );
296303 domain1 .verifyDomainCreated ();
297304
305+ testCompletedSuccessfully = true ;
306+
298307 } finally {
299308 if (domain1 != null && (JENKINS || testCompletedSuccessfully )) {
300309 domain1 .destroy ();
@@ -339,6 +348,9 @@ public void testJRFDomainAdminT3Channel() throws Exception {
339348
340349 // verify the Admin T3Channel is exposed
341350 testAdminT3Channel (domain1 );
351+
352+ testCompletedSuccessfully = true ;
353+
342354 } finally {
343355 if (domain1 != null && (JENKINS || testCompletedSuccessfully )) {
344356 domain1 .destroy ();
@@ -400,12 +412,13 @@ private void verifyMSPodsNotReadyCountNotExceedMaxUnAvailable(
400412 */
401413 private int getMSPodsNotReadyCount (JRFDomain domain ) throws Exception {
402414
415+ String domainuid = (String ) domain .getDomainMap ().get ("domainUID" );
403416 String managedServerNameBase = (String ) domain .getDomainMap ().get ("managedServerNameBase" );
404417 StringBuffer cmd = new StringBuffer ();
405418 cmd .append ("kubectl get pods -n " )
406419 .append (domain .getDomainNS ())
407420 .append (" | grep " )
408- .append (managedServerNameBase )
421+ .append (domainuid + "-" + managedServerNameBase )
409422 .append (" | grep 0/1 | wc -l" );
410423 ExecResult result = TestUtils .exec (cmd .toString ());
411424
@@ -421,12 +434,13 @@ private int getMSPodsNotReadyCount(JRFDomain domain) throws Exception {
421434 */
422435 private int getMSPodsRunningAndReadyCount (JRFDomain domain ) throws Exception {
423436
437+ String domainuid = (String ) domain .getDomainMap ().get ("domainUID" );
424438 String managedServerNameBase = (String ) domain .getDomainMap ().get ("managedServerNameBase" );
425439 StringBuffer cmd = new StringBuffer ();
426440 cmd .append ("kubectl get pods -n " )
427441 .append (domain .getDomainNS ())
428442 .append (" | grep " )
429- .append (managedServerNameBase )
443+ .append (domainuid + "-" + managedServerNameBase )
430444 .append (" | grep 1/1 | grep Running | wc -l" );
431445 ExecResult result = TestUtils .exec (cmd .toString ());
432446
@@ -441,12 +455,13 @@ private int getMSPodsRunningAndReadyCount(JRFDomain domain) throws Exception {
441455 * @throws Exception - if any error occurs
442456 */
443457 private int getMSPodsCount (JRFDomain domain ) throws Exception {
458+ String domainuid = (String ) domain .getDomainMap ().get ("domainUID" );
444459 String managedServerNameBase = (String ) domain .getDomainMap ().get ("managedServerNameBase" );
445460 StringBuffer cmd = new StringBuffer ();
446461 cmd .append ("kubectl get pods -n " )
447462 .append (domain .getDomainNS ())
448463 .append (" | grep " )
449- .append (managedServerNameBase )
464+ .append (domainuid + "-" + managedServerNameBase )
450465 .append (" | wc -l" );
451466 ExecResult result = TestUtils .exec (cmd .toString ());
452467
0 commit comments