mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-26 14:00:26 +00:00
Poll instead of sleeping
- Add the Await test helper that polls a condition every ten milliseconds under a bounded timeout - Replace every Thread.sleep in the fourteen polling test classes with a condition wait, a latch wait or a bounded quiet window - Keep the crash-consistency fsync interception in GenerationHistoryAdmissionTest and SavedBiomeStoreBatchTest on real barriers
This commit is contained in:
1 parent
c75b0e01af
commit
42798c6340
15 files changed
+174
-193
No files matched your search
+2
-1
@@ -32,6 +32,7 @@ import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.locks.LockSupport;
|
||||
import java.util.function.IntConsumer;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@@ -218,7 +219,7 @@ public class NativeStructureVolumeIndexTest {
|
||||
if (cleared) {
|
||||
break;
|
||||
}
|
||||
Thread.sleep(1);
|
||||
LockSupport.parkNanos(TimeUnit.MILLISECONDS.toNanos(10L));
|
||||
}
|
||||
assertTrue("Origin eviction did not complete before the query cache lock", cleared);
|
||||
resolver.release();
|
||||
|
||||
Reference in new issue
Block a user