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