}
@Test
public void testMasterAndSlave() throws Exception {
final WildFlyManagedConfiguration masterConfig = createConfiguration("domain.xml", "host-master.xml", getClass().getSimpleName());
final DomainLifecycleUtil masterUtils = new DomainLifecycleUtil(masterConfig);
final WildFlyManagedConfiguration slaveConfig = createConfiguration("domain.xml", "host-slave.xml", getClass().getSimpleName(),
"slave", slaveAddress, 19999);
final DomainLifecycleUtil slaveUtils = new DomainLifecycleUtil(slaveConfig);
try {
masterUtils.start();
slaveUtils.start();
// Double-check server status by confirming server-one can accept a web request to the root
URLConnection connection = new URL("http://" + TestSuiteEnvironment.formatPossibleIpv6Address(slaveAddress) + ":8080").openConnection();
connection.connect();
} finally {
try {
slaveUtils.stop();
} finally {
masterUtils.stop();
}
}
}