89
89
import static oracle .weblogic .kubernetes .utils .ThreadSafeLogger .getLogger ;
90
90
import static org .apache .commons .io .FileUtils .deleteDirectory ;
91
91
import static org .junit .jupiter .api .Assertions .assertDoesNotThrow ;
92
- import static org .junit .jupiter .api .Assertions .assertEquals ;
93
92
import static org .junit .jupiter .api .Assertions .assertFalse ;
94
93
import static org .junit .jupiter .api .Assertions .assertNotEquals ;
95
94
import static org .junit .jupiter .api .Assertions .assertNotNull ;
@@ -525,11 +524,16 @@ public static void buildAndDeployClusterviewApp(String domainNamespace, List<Str
525
524
for (String domainUid : domainUids ) {
526
525
// admin/managed server name here should match with model yaml in MII_BASIC_WDT_MODEL_FILE
527
526
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 );
529
533
}
530
534
}
531
535
532
- private static void deployApplication (String namespace , String domainUid , String adminServerPodName ,
536
+ private static boolean deployApplication (String namespace , String domainUid , String adminServerPodName ,
533
537
Path clusterViewAppPath ) {
534
538
getLogger ().info ("Getting node port for admin server default channel" );
535
539
int serviceNodePort = assertDoesNotThrow (() ->
@@ -545,7 +549,7 @@ private static void deployApplication(String namespace, String domainUid, String
545
549
targets , clusterViewAppPath , null , domainUid + "clusterview" );
546
550
assertNotNull (result , "Application deployment failed" );
547
551
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" );
549
553
}
550
554
551
555
/**
0 commit comments