use of org.wso2.carbon.integration.common.utils.mgt.ServerConfigurationManager in project product-iots by wso2.
the class SampleInstallationTest method serverRestartTest.
@Test(description = "Test restarting the server", groups = Constants.TestSample.SAMPLE_INSTALL, dependsOnMethods = { "sampleInstallationTest" })
public void serverRestartTest() {
ServerConfigurationManager serverManager;
try {
serverManager = new ServerConfigurationManager(automationContext);
log.info("Restart Triggered -------------------------------------------------------------------");
serverManager.restartGracefully();
logViewerClient.getAllRemoteSystemLogs();
waitForRestart();
} catch (AutomationUtilException | XPathExpressionException | MalformedURLException e) {
log.error("Restart failed due to : " + e.getLocalizedMessage());
} catch (RemoteException | LogViewerLogViewerException e) {
log.error("Cannot get server log due to : " + e.getLocalizedMessage());
}
}
Aggregations