@ -106,16 +106,20 @@ public class CarbonServerManagerExtension {
. automationContext . getInstance ( ) . getHosts ( ) . get ( "default" ) ) ;
. automationContext . getInstance ( ) . getHosts ( ) . get ( "default" ) ) ;
long time = System . currentTimeMillis ( ) + 60000L ;
long time = System . currentTimeMillis ( ) + 60000L ;
while ( true ) {
// while(true) {
if ( this . inputStreamHandler . getOutput ( ) . contains ( "Mgt Console URL" ) | | System . currentTimeMillis ( ) > = time ) {
// if(this.inputStreamHandler.getOutput().contains("Mgt Console URL") || System.currentTimeMillis() >= time) {
int httpsPort = defaultHttpsPort + this . portOffset ;
// int httpsPort = defaultHttpsPort + this.portOffset;
String backendURL = this . automationContext . getContextUrls ( ) . getSecureServiceUrl ( ) . replaceAll ( "(:\\d+)" , ":" + httpsPort ) ;
// String backendURL = this.automationContext.getContextUrls().getSecureServiceUrl().replaceAll("(:\\d+)", ":" + httpsPort);
User superUser = this . automationContext . getSuperTenant ( ) . getTenantAdmin ( ) ;
// User superUser = this.automationContext.getSuperTenant().getTenantAdmin();
ClientConnectionUtil . waitForLogin ( backendURL , superUser ) ;
// ClientConnectionUtil.waitForLogin(backendURL, superUser);
log . info ( "Server started successfully." ) ;
// log.info("Server started successfully.");
break ;
// break;
}
// }
}
// }
int httpsPort = defaultHttpsPort + this . portOffset ;
String backendURL = this . automationContext . getContextUrls ( ) . getSecureServiceUrl ( ) . replaceAll ( "(:\\d+)" , ":" + httpsPort ) ;
User superUser = this . automationContext . getSuperTenant ( ) . getTenantAdmin ( ) ;
ClientConnectionUtil . waitForLogin ( backendURL , superUser ) ;
} catch ( XPathExpressionException | IOException var13 ) {
} catch ( XPathExpressionException | IOException var13 ) {
throw new IllegalStateException ( "Unable to start server" , var13 ) ;
throw new IllegalStateException ( "Unable to start server" , var13 ) ;
}
}
@ -212,9 +216,9 @@ public class CarbonServerManagerExtension {
long time = System . currentTimeMillis ( ) + 300000L ;
long time = System . currentTimeMillis ( ) + 300000L ;
while ( ! this . inputStreamHandler . getOutput ( ) . contains ( "Halting JVM" ) & & System . currentTimeMillis ( ) < time ) {
// while(!this.inputStreamHandler.getOutput().contains("Halting JVM") && System.currentTimeMillis() < time) {
;
// ;
}
// }
log . info ( "Server stopped successfully..." ) ;
log . info ( "Server stopped successfully..." ) ;
}
}
@ -261,9 +265,9 @@ public class CarbonServerManagerExtension {
long time = System . currentTimeMillis ( ) + 300000L ;
long time = System . currentTimeMillis ( ) + 300000L ;
while ( ! this . inputStreamHandler . getOutput ( ) . contains ( "Halting JVM" ) & & System . currentTimeMillis ( ) < time ) {
// while(!this.inputStreamHandler.getOutput().contains("Halting JVM") && System.currentTimeMillis() < time) {
;
// ;
}
// }
time = System . currentTimeMillis ( ) ;
time = System . currentTimeMillis ( ) ;