use of alluxio.hub.proto.AgentProcessStatusChangeRequest in project alluxio by Alluxio.
the class AgentManagerServiceTest method testAgentRestartAction.
@Test
public void testAgentRestartAction() throws Exception {
AgentProcessStatusChangeRequest r = AgentProcessStatusChangeRequest.newBuilder().setNodeType(AlluxioNodeType.MASTER).setAction(ProcessStateChange.RESTART).build();
mClient.processStatusChange(r);
verify(mLauncher).stop(AlluxioNodeType.MASTER);
verify(mLauncher).start(AlluxioNodeType.MASTER);
}
use of alluxio.hub.proto.AgentProcessStatusChangeRequest in project alluxio by Alluxio.
the class AgentManagerServiceTest method testStateChangeThrowException.
@Test
public void testStateChangeThrowException() throws Exception {
doThrow(new IOException("spied")).when(mContext).changeState(ArgumentMatchers.any(), ArgumentMatchers.any());
AgentProcessStatusChangeRequest r = AgentProcessStatusChangeRequest.newBuilder().setNodeType(AlluxioNodeType.MASTER).setAction(ProcessStateChange.RESTART).build();
assertThrows(StatusRuntimeException.class, () -> {
mClient.processStatusChange(r);
});
}
use of alluxio.hub.proto.AgentProcessStatusChangeRequest in project alluxio by Alluxio.
the class AgentManagerServiceTest method testAgentStartAction.
@Test
public void testAgentStartAction() throws Exception {
AgentProcessStatusChangeRequest r = AgentProcessStatusChangeRequest.newBuilder().setNodeType(AlluxioNodeType.MASTER).setAction(ProcessStateChange.START).build();
mClient.processStatusChange(r);
verify(mLauncher).start(AlluxioNodeType.MASTER);
}
use of alluxio.hub.proto.AgentProcessStatusChangeRequest in project alluxio by Alluxio.
the class AgentManagerServiceTest method testAgentStopAction.
@Test
public void testAgentStopAction() throws Exception {
AgentProcessStatusChangeRequest r = AgentProcessStatusChangeRequest.newBuilder().setNodeType(AlluxioNodeType.MASTER).setAction(ProcessStateChange.STOP).build();
mClient.processStatusChange(r);
verify(mLauncher).stop(AlluxioNodeType.MASTER);
}
Aggregations