Merge pull request #1912 from clnperez/threshold-test

check for threshold, not range
This commit is contained in:
Michael Crosby
2017-12-14 14:53:45 -05:00
committed by GitHub

View File

@@ -10,6 +10,7 @@ import (
)
func TestPauseThreshold(t *testing.T) {
cfg := &config{
// With 100μs, gc should run about every 5ms
PauseThreshold: 0.02,
@@ -39,8 +40,9 @@ func TestPauseThreshold(t *testing.T) {
}()
time.Sleep(time.Millisecond * 15)
if c := tc.runCount(); c < 3 || c > 4 {
t.Fatalf("unexpected gc run count %d, expected between 5 and 6", c)
if c := tc.runCount(); c > 4 {
t.Fatalf("unexpected gc run count %d, expected less than 5", c)
}
}