Skip to content

Commit

Permalink
gogctuner: fix unstable test in the TestTuner
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
  • Loading branch information
hawkingrei committed Nov 13, 2022
1 parent 86d3b46 commit 2479f1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/gctuner/tuner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ func TestTuner(t *testing.T) {
runtime.GC()
for i := 0; i < 100; i++ {
runtime.GC()
require.GreaterOrEqual(t, tn.getGCPercent(), uint32(50))
require.LessOrEqual(t, tn.getGCPercent(), uint32(100))
require.GreaterOrEqual(t, tn.getGCPercent(), MinGCPercent)
require.LessOrEqual(t, tn.getGCPercent(), uint32(200))
}

// 3/4 threshold
Expand Down

0 comments on commit 2479f1b

Please sign in to comment.