Fix spurious failure under heavy load.
Change-Id: I1d5b203fba0aae1d2dd64905fd0b764a76bca87f
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -171,7 +171,7 @@ public final class BoundedThreadPoolTest { | ... | @@ -171,7 +171,7 @@ public final class BoundedThreadPoolTest { |
171 | latches.remove(0).countDown(); // release the second thread | 171 | latches.remove(0).countDown(); // release the second thread |
172 | 172 | ||
173 | assertTrue("Thread should be unblocked", | 173 | assertTrue("Thread should be unblocked", |
174 | - myLatch.await(1, TimeUnit.SECONDS)); | 174 | + myLatch.await(10, TimeUnit.SECONDS)); |
175 | long delta = System.nanoTime() - start; | 175 | long delta = System.nanoTime() - start; |
176 | double load = exec.getQueue().size() / (double) maxQueueSize; | 176 | double load = exec.getQueue().size() / (double) maxQueueSize; |
177 | assertTrue("Load is greater than threshold", load <= 0.8); | 177 | assertTrue("Load is greater than threshold", load <= 0.8); | ... | ... |
-
Please register or login to post a comment