@Test(timeout = 10000) public void testGracefulShutdownWhileInSafeMode() throws Exception { when(_queue.peek()).thenAnswer(new SleepingAnswer()); long safeModeMaxTime = 2000; OperatorThread operatorThread = new OperatorThread(_context, safeModeMaxTime); operatorThread.start(); assertTrue(operatorThread.isAlive()); assertTrue(operatorThread.isInSafeMode()); operatorThread.interrupt(); operatorThread.join(); }
public boolean isInSafeMode() { return _safeMode; }
OperatorThread extends Thread { public boolean isInSafeMode() { return _safeMode; } }
OperatorThread extends Thread { public boolean isInSafeMode() { return _safeMode; } OperatorThread(final MasterContext context, final long safeModeMaxTime); }
OperatorThread extends Thread { public boolean isInSafeMode() { return _safeMode; } OperatorThread(final MasterContext context, final long safeModeMaxTime); boolean isInSafeMode(); OperationRegistry getOperationRegistry(); MasterContext getContext(); @Override void run(); }
OperatorThread extends Thread { public boolean isInSafeMode() { return _safeMode; } OperatorThread(final MasterContext context, final long safeModeMaxTime); boolean isInSafeMode(); OperationRegistry getOperationRegistry(); MasterContext getContext(); @Override void run();  }