Skip to content

Commit

Permalink
cpu: fix ticker to avoid close early
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <[email protected]>
  • Loading branch information
hawkingrei committed Dec 20, 2022
1 parent b4cd66b commit 9d18606
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/cpu/cpu_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestCPUValue(t *testing.T) {
}()
}
Observer.Start()
time.Sleep(30 * time.Second)
time.Sleep(5 * time.Second)
require.GreaterOrEqual(t, GetCPUUsage(), 0.0)
require.Less(t, GetCPUUsage(), 1.0)
Observer.Stop()
Expand Down

0 comments on commit 9d18606

Please sign in to comment.