@@ -463,12 +463,14 @@ public static boolean verifyExecuteResult(String result, String regex) {
463463 private static Callable <Boolean > checkClusterStatus (String domainUid , String domainNamespace ,
464464 String samplePathDir , String clusterName ,
465465 String regex ) {
466- // use clusterStatus.sh to verify scaling results
467- String result = assertDoesNotThrow (() ->
468- executeLifecycleScript (domainUid , domainNamespace , samplePathDir ,
469- STATUS_CLUSTER_SCRIPT , CLUSTER_LIFECYCLE , clusterName ),
470- String .format ("Failed to run %s" , STATUS_CLUSTER_SCRIPT ));
471- logger .info ("Status of cluster {0} retured {1}, expected {2}" , clusterName , result , regex );
472- return () -> verifyExecuteResult (result , regex );
466+ return () -> {
467+ // use clusterStatus.sh to verify scaling results
468+ String result = assertDoesNotThrow (() ->
469+ executeLifecycleScript (domainUid , domainNamespace , samplePathDir ,
470+ STATUS_CLUSTER_SCRIPT , CLUSTER_LIFECYCLE , clusterName ),
471+ String .format ("Failed to run %s" , STATUS_CLUSTER_SCRIPT ));
472+ logger .info ("Status of cluster {0} retured {1}, expected {2}" , clusterName , result , regex );
473+ return verifyExecuteResult (result , regex );
474+ };
473475 }
474476}
0 commit comments