use of alluxio.hub.manager.process.ManagerProcess in project alluxio by Alluxio.
the class AgentProcessMonitorTest method testProcessMonitorSuccess.
@Test
public void testProcessMonitorSuccess() throws Exception {
InstancedConfiguration c = getTestConfig();
mTempDir.newFolder("bin");
mTempDir.newFile("bin/alluxio-start.sh");
c.set(PropertyKey.HOME, mTempDir.getRoot().getAbsolutePath());
try (ManagerProcess mProc = new ManagerProcess(c)) {
InstancedConfiguration agentConf = new InstancedConfiguration(c.copyProperties());
agentConf.set(PropertyKey.HUB_MANAGER_RPC_PORT, mProc.getRpcPort());
try (AgentProcess proc = new AgentProcess(agentConf)) {
CountingRetry cntRetry = new CountingRetry(5);
AgentProcessMonitor.pingService(new InetSocketAddress("127.0.0.1", proc.getRpcPort()), cntRetry, 200);
}
} catch (Exception e) {
fail("Should not have thrown an exception: " + e);
}
}
Aggregations