use of org.jboss.as.test.integration.management.util.MgmtOperationException in project wildfly by wildfly.
the class LegacyConfigTest method awaitServerLaunch.
private void awaitServerLaunch(ModelControllerClient client, String profile) throws InterruptedException {
long timeout = System.currentTimeMillis() + TimeoutUtil.adjust(20000);
ModelNode op = Util.getReadAttributeOperation(TEST_SERVER, "server-state");
do {
try {
ModelNode state = DomainTestUtils.executeForResult(op, client);
if ("running".equalsIgnoreCase(state.asString())) {
return;
}
} catch (IOException | MgmtOperationException e) {
// ignore and try again
}
TimeUnit.MILLISECONDS.sleep(250L);
} while (System.currentTimeMillis() < timeout);
Assert.fail("Server did not start using " + profile);
}
Aggregations