mirror of
https://github.com/usatiuk/dhfs.git
synced 2025-10-28 20:47:49 +01:00
Utils: fix a race in hash set queue test
This commit is contained in:
@@ -62,7 +62,7 @@ public class HashSetDelayedBlockingQueueTest {
|
||||
}
|
||||
});
|
||||
var thing = queue.getAllWait(); // Theoretically you can get one...
|
||||
if (thing.size() == 1) thing.add(queue.getAllWait());
|
||||
if (thing.size() == 1) thing.addAll(queue.getAllWait());
|
||||
var gotTime = System.currentTimeMillis();
|
||||
Assertions.assertIterableEquals(List.of("hello1", "hello2"), thing);
|
||||
Assertions.assertTrue((gotTime - curTime) >= 1010);
|
||||
|
||||
Reference in New Issue
Block a user