8989import static oracle .weblogic .kubernetes .utils .ThreadSafeLogger .getLogger ;
9090import static org .apache .commons .io .FileUtils .deleteDirectory ;
9191import static org .junit .jupiter .api .Assertions .assertDoesNotThrow ;
92- import static org .junit .jupiter .api .Assertions .assertEquals ;
9392import static org .junit .jupiter .api .Assertions .assertFalse ;
9493import static org .junit .jupiter .api .Assertions .assertNotEquals ;
9594import static org .junit .jupiter .api .Assertions .assertNotNull ;
@@ -525,11 +524,16 @@ public static void buildAndDeployClusterviewApp(String domainNamespace, List<Str
525524 for (String domainUid : domainUids ) {
526525 // admin/managed server name here should match with model yaml in MII_BASIC_WDT_MODEL_FILE
527526 String adminServerPodName = domainUid + "-admin-server" ;
528- deployApplication (domainNamespace , domainUid , adminServerPodName , clusterViewAppPath );
527+ testUntil (() -> deployApplication (domainNamespace , domainUid , adminServerPodName , clusterViewAppPath ),
528+ getLogger (),
529+ "deploying application {0} to pod {1} in namespace {2} succeeds" ,
530+ clusterViewAppPath ,
531+ adminServerPodName ,
532+ domainNamespace );
529533 }
530534 }
531535
532- private static void deployApplication (String namespace , String domainUid , String adminServerPodName ,
536+ private static boolean deployApplication (String namespace , String domainUid , String adminServerPodName ,
533537 Path clusterViewAppPath ) {
534538 getLogger ().info ("Getting node port for admin server default channel" );
535539 int serviceNodePort = assertDoesNotThrow (() ->
@@ -545,7 +549,7 @@ private static void deployApplication(String namespace, String domainUid, String
545549 targets , clusterViewAppPath , null , domainUid + "clusterview" );
546550 assertNotNull (result , "Application deployment failed" );
547551 getLogger ().info ("Application deployment returned {0}" , result .toString ());
548- assertEquals ( "202" , result .stdout (), "Deployment didn't return HTTP status code 202" );
552+ return result .stdout (). equals ( " 202" );
549553 }
550554
551555 /**
0 commit comments