Skip to content

Commit

Permalink
await
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Oct 26, 2024
1 parent a249411 commit 2f569a9
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,12 @@ void doTest() throws Exception {
assertThat(values.isEmpty(), is(true));
key1 = key2 = null; // Make eligible for GC
System.gc();
Thread.sleep(1000L);
triggerClean();
await()
.untilAsserted(
() -> {
triggerClean();
assertThat(map.approximateSize(), is(2));
});
assertThat(map.get(key3), is(value3));
assertThat(map.getIfPresent(key3), is(value3));
assertThat(map.get(key4), is(value4));
Expand Down

0 comments on commit 2f569a9

Please sign in to comment.