Skip to content

Commit

Permalink
More forgiving assertion in ResourcePoolTest
Browse files Browse the repository at this point in the history
since the nature of this test isn't deterministic
  • Loading branch information
tinwelint committed Sep 13, 2016
1 parent 3cfbf78 commit a2605cf
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,9 @@ public void shouldReclaimAndRecreateWhenUsageGoesDownBetweenSpikes() throws Exce
}

// then
// currentPeakSize should be at bellowPoolMinSize
assertEquals( bellowPoolMinSize, stateMonitor.currentPeakSize.get() );
// currentPeakSize should not be higher than bellowPoolMinSize
assertTrue( String.valueOf( stateMonitor.currentPeakSize.get() ),
stateMonitor.currentPeakSize.get() <= bellowPoolMinSize );
// target size should remain at pool min size
assertEquals( poolMinSize, stateMonitor.targetSize.get() );
assertEquals( poolMinSize, pool.unusedSize() );
Expand Down

0 comments on commit a2605cf

Please sign in to comment.