mirror of
https://github.com/apache/lucene.git
synced 2025-02-28 21:39:25 +00:00
SOLR-13479: Harden OverseerTaskQueueTest
This commit is contained in:
parent
b9db118ed3
commit
18cb42ee80
@ -274,8 +274,8 @@ public class DistributedQueueTest extends SolrTestCaseJ4 {
|
|||||||
// The 4th element in the queue will end with a "3".
|
// The 4th element in the queue will end with a "3".
|
||||||
return child.endsWith("3");
|
return child.endsWith("3");
|
||||||
}).size());
|
}).size());
|
||||||
assertTrue(System.nanoTime() - start < TimeUnit.MILLISECONDS.toNanos(1000));
|
long timeTaken = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - start);
|
||||||
assertTrue(System.nanoTime() - start >= TimeUnit.MILLISECONDS.toNanos(250));
|
assertTrue("Time was " + timeTaken + "ms, expected 250-1500ms", timeTaken > 250 && timeTaken < 1500);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void forceSessionExpire() throws InterruptedException, TimeoutException {
|
private void forceSessionExpire() throws InterruptedException, TimeoutException {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user