Reindex: Raise timeout on flaky test

This gives the test longer to block its updates. Now that we're checking
if the updates actually blocked saw that they may not do so in the
normal 10 seconds on a highly loaded system. And our jenkins machines
often function like highly loaded systems. Maybe this fixes #26758!
This commit is contained in:
Nik Everett 2018-01-30 17:57:55 -05:00
parent 6f64e9728b
commit 9aeed74fe9
1 changed files with 3 additions and 1 deletions

View File

@ -120,7 +120,9 @@ public class CancelTests extends ReindexTestCase {
* exhausted their slice while others might have quite a bit left * exhausted their slice while others might have quite a bit left
* to work on. We can't control that. */ * to work on. We can't control that. */
logger.debug("waiting for updates to be blocked"); logger.debug("waiting for updates to be blocked");
boolean blocked = awaitBusy(() -> ALLOWED_OPERATIONS.hasQueuedThreads() && ALLOWED_OPERATIONS.availablePermits() == 0); boolean blocked = awaitBusy(
() -> ALLOWED_OPERATIONS.hasQueuedThreads() && ALLOWED_OPERATIONS.availablePermits() == 0,
1, TimeUnit.MINUTES); // 10 seconds is usually fine but on heavilly loaded machines this can wake a while
assertTrue("updates blocked", blocked); assertTrue("updates blocked", blocked);
// Status should show the task running // Status should show the task running