@@ -408,23 +408,28 @@ private void copyScalingScriptToPod(
408408
409409 private void callWebAppAndVerifyScaling (Domain domain , int replicas ) throws Exception {
410410 Map <String , Object > domainMap = domain .getDomainMap ();
411- String domainNS = (String ) domainMap .get ("namespace" );
411+ String domainNS = domainMap .get ("namespace" ).toString ();
412+ String domainUid = domain .getDomainUid ();
413+ String clusterName = domainMap .get ("clusterName" ).toString ();
412414
413415 // call opensessionapp
414416 domain .callWebAppAndVerifyLoadBalancing ("opensessionapp" , false );
415417 logger .info ("Sleeping for 30 seconds for scaleup" );
416418 Thread .sleep (30 * 1000 );
417419
420+ int replicaCntAfterScaleup = TestUtils .getClusterReplicas (domainUid , clusterName , domainNS );
418421 String managedServerNameBase = (String ) domainMap .get ("managedServerNameBase" );
419- String podName = domain .getDomainUid () + "-" + managedServerNameBase + replicas ;
422+ for (int i = replicas ; i <= replicaCntAfterScaleup ; i ++) {
423+ String podName = domain .getDomainUid () + "-" + managedServerNameBase + i ;
420424
421- logger .info ("Checking if managed pod(" + podName + ") is Running" );
422- TestUtils .checkPodCreated (podName , domainNS );
425+ logger .info ("Checking if managed pod(" + podName + ") is Running" );
426+ TestUtils .checkPodCreated (podName , domainNS );
423427
424- logger .info ("Checking if managed server (" + podName + ") is Running" );
425- TestUtils .checkPodReady (podName , domainNS );
428+ logger .info ("Checking if managed server (" + podName + ") is Running" );
429+ TestUtils .checkPodReady (podName , domainNS );
426430
427- logger .info ("Checking if managed service(" + podName + ") is created" );
428- TestUtils .checkServiceCreated (podName , domainNS );
431+ logger .info ("Checking if managed service(" + podName + ") is created" );
432+ TestUtils .checkServiceCreated (podName , domainNS );
433+ }
429434 }
430435}
0 commit comments