mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
make some Queue tests less aggressive on Thread.sleep usage
Fixes #6297
This commit is contained in:
parent
fe4118288e
commit
a4140dab6b
1 changed files with 4 additions and 4 deletions
|
@ -417,7 +417,7 @@ public class QueueTest {
|
|||
ExecutorService executor = Executors.newFixedThreadPool(1);
|
||||
Future<Long> future = executor.submit(write);
|
||||
|
||||
while (!q.isFull()) { Thread.sleep(1); }
|
||||
while (!q.isFull()) { Thread.sleep(10); }
|
||||
|
||||
assertThat(q.isFull(), is(true));
|
||||
|
||||
|
@ -452,7 +452,7 @@ public class QueueTest {
|
|||
ExecutorService executor = Executors.newFixedThreadPool(1);
|
||||
Future<Long> future = executor.submit(write);
|
||||
|
||||
while (!q.isFull()) { Thread.sleep(1); }
|
||||
while (!q.isFull()) { Thread.sleep(10); }
|
||||
|
||||
assertThat(q.isFull(), is(true));
|
||||
|
||||
|
@ -460,7 +460,7 @@ public class QueueTest {
|
|||
b.close(); // purge 1 page
|
||||
|
||||
// spin wait until data is written and write blocks
|
||||
while (q.isFull()) { Thread.sleep(1); }
|
||||
while (q.isFull()) { Thread.sleep(10); }
|
||||
|
||||
assertThat(q.isFull(), is(false));
|
||||
|
||||
|
@ -495,7 +495,7 @@ public class QueueTest {
|
|||
ExecutorService executor = Executors.newFixedThreadPool(1);
|
||||
Future<Long> future = executor.submit(write);
|
||||
|
||||
while (!q.isFull()) { Thread.sleep(1); }
|
||||
while (!q.isFull()) { Thread.sleep(10); }
|
||||
|
||||
assertThat(q.isFull(), is(true));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue