Skip to content

Commit

Permalink
Merge pull request #159 from chrisvest/flaky-tests
Browse files Browse the repository at this point in the history
Fix flaky DefaultPoolTest
  • Loading branch information
chrisvest committed May 27, 2024
2 parents f478ee5 + fcfeedc commit 1cfe94f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/java/blackbox/DefaultPoolTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,10 @@ class DefaultPoolTest extends ThreadBasedPoolTest {
protected PoolBuilder<GenericPoolable> createInitialPoolBuilder(AlloKit.CountingAllocator allocator) {
return Pool.from(allocator);
}

@Override
void claimWhenInterruptedMustNotThrowIfObjectIsAvailableViaCache(Taps taps) throws Exception {
noBackgroundExpirationChecking(); // Prevent background expiration checking from claiming cached object.
super.claimWhenInterruptedMustNotThrowIfObjectIsAvailableViaCache(taps);
}
}

0 comments on commit 1cfe94f

Please sign in to comment.