fixed racew in unit test
This commit is contained in:
parent
8eb56edc8a
commit
cb74cb8c1f
|
@ -238,10 +238,13 @@ public class ThreadLimitHandlerTest
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
|
|
||||||
while(total.get()<10 && System.nanoTime()<wait)
|
while(total.get()<10 && System.nanoTime()<wait)
|
||||||
Thread.sleep(1);
|
Thread.sleep(10);
|
||||||
|
|
||||||
assertThat(count.get(),is(0));
|
|
||||||
assertThat(total.get(),is(10));
|
assertThat(total.get(),is(10));
|
||||||
|
|
||||||
|
while(count.get()>0 && System.nanoTime()<wait)
|
||||||
|
Thread.sleep(10);
|
||||||
|
assertThat(count.get(),is(0));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue