use of org.bboxdb.commons.ServiceState in project bboxdb by jnidzwetzki.
the class TestServiceState method testTransition6.
/**
* Force dispatch
* @throws InterruptedException
*/
@Test(timeout = 1000)
public void testTransition6() throws InterruptedException {
final ServiceState state = new ServiceState();
Assert.assertFalse(state.isInFinishedState());
Assert.assertFalse(state.isInTerminatedState());
state.forceDispatchToTerminated();
Assert.assertTrue(state.isInFinishedState());
Assert.assertTrue(state.isInTerminatedState());
}
use of org.bboxdb.commons.ServiceState in project bboxdb by jnidzwetzki.
the class TestServiceState method testDispatchToStarting1.
/**
* Dispath to starting
*/
@Test(timeout = 60000)
public void testDispatchToStarting1() {
final ServiceState state = new ServiceState();
final IllegalArgumentException exception = new IllegalArgumentException();
state.dispatchToFailed(exception);
state.dipatchToStarting();
Assert.assertFalse(state.isInStartingState());
}