same applies to StopWatcher thread
}
public void stopForcibly() {
- eventWatcher.interrupt();
- stopWatcher.interrupt();
+ Thread currentThread = Thread.currentThread();
+ if (currentThread != eventWatcher) {
+ eventWatcher.interrupt();
+ }
+ if (currentThread != stopWatcher) {
+ stopWatcher.interrupt();
+ }
if (process != null) {
process.destroyForcibly();
waitForDown();
public class SchedulerImplTest {
@Rule
- public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(300));
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Rule