Closed
Description
We guess that there might be a bug in evaluating the used % of CPU, which was also spotted by CI. Actually, it's fairly easy to reproduce it:
$ go test -timeout 120s -run ^TestStatCPUCmd$ github.com/coder/coder/cli -short -coverpkg=./... -count 10
--- FAIL: TestStatCPUCmd (0.00s)
--- FAIL: TestStatCPUCmd/JSON (10.10s)
clitest.go:71: invoking command: coder --global-config /tmp/TestStatCPUCmdJSON2757059279/001 stat cpu --output=json
stat_test.go:98:
Error Trace: /Users/mtojek/code/coder/cli/stat_test.go:98
Error: Condition never satisfied
Test: TestStatCPUCmd/JSON
...
I will disable the relevant test.
cc @johnstcn (once you're back from holidays)