mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-19 03:11:09 +02:00
Increase test failure timer.
- Was failing under heavy laod. Change-Id: I30bd6e8c00d42fe585420583186a98fbf1f7ff5d
This commit is contained in:
parent
03a73e0e70
commit
c2093cbb33
@ -31,7 +31,7 @@ import static org.junit.Assert.*;
|
|||||||
*/
|
*/
|
||||||
public class BlockingBooleanTest {
|
public class BlockingBooleanTest {
|
||||||
|
|
||||||
private static final int TIMEOUT = 100; //ms
|
private static final int FAIL_TIMEOUT = 1000; //ms
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void basics() {
|
public void basics() {
|
||||||
@ -62,7 +62,7 @@ public class BlockingBooleanTest {
|
|||||||
}
|
}
|
||||||
b.set(value);
|
b.set(value);
|
||||||
try {
|
try {
|
||||||
assertTrue(latch.await(TIMEOUT, TimeUnit.MILLISECONDS));
|
assertTrue(latch.await(FAIL_TIMEOUT, TimeUnit.MILLISECONDS));
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ public class BlockingBooleanTest {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
assertTrue(latch.await(TIMEOUT, TimeUnit.MILLISECONDS));
|
assertTrue(latch.await(FAIL_TIMEOUT, TimeUnit.MILLISECONDS));
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
@ -126,14 +126,14 @@ public class BlockingBooleanTest {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
assertTrue(sameLatch.await(TIMEOUT, TimeUnit.MILLISECONDS));
|
assertTrue(sameLatch.await(FAIL_TIMEOUT, TimeUnit.MILLISECONDS));
|
||||||
assertEquals(waitLatch.getCount(), numThreads / 2);
|
assertEquals(waitLatch.getCount(), numThreads / 2);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
b.set(true);
|
b.set(true);
|
||||||
try {
|
try {
|
||||||
assertTrue(waitLatch.await(TIMEOUT, TimeUnit.MILLISECONDS));
|
assertTrue(waitLatch.await(FAIL_TIMEOUT, TimeUnit.MILLISECONDS));
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
@ -158,7 +158,7 @@ public class BlockingBooleanTest {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
assertTrue(latch.await(TIMEOUT, TimeUnit.MILLISECONDS));
|
assertTrue(latch.await(FAIL_TIMEOUT, TimeUnit.MILLISECONDS));
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user