SOLR-13479: Harden OverseerTaskQueueTest

(cherry picked from commit 18cb42ee80)
This commit is contained in:
Jan Høydahl 2019-05-17 20:54:46 +02:00
parent 6f83dad301
commit 889cc4fc5c
1 changed files with 2 additions and 2 deletions

View File

@ -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 {