Trying to fix flaky test

This commit is contained in:
Alexey Andreev 2017-02-16 22:33:18 +03:00
parent 60f8633acb
commit 1ea69b7d17

View File

@ -39,14 +39,14 @@ public class ThreadTest {
new Thread() {
@Override public void run() {
try {
Thread.sleep(100);
Thread.sleep(50);
} catch (InterruptedException e) {
}
mainThread.interrupt();
}
}.start();
try {
Thread.sleep(300);
Thread.sleep(500);
fail("Exception expected");
} catch (InterruptedException e) {
assertEquals(Thread.currentThread(), mainThread);