提交 1de1357e 编写于 作者: S Shirou WAKAYAMA

[process]: add FailNow to avoid panic.

上级 1ab11f7a
......@@ -374,6 +374,9 @@ func Test_CPUTimes(t *testing.T) {
cpuTimes1, err := process.CPUTimes()
assert.Nil(t, err)
if cpuTimes0 == nil || cpuTimes1 == nil {
t.FailNow()
}
measuredElapsed := cpuTimes1.Total() - cpuTimes0.Total()
message := fmt.Sprintf("Measured %fs != spun time of %fs\ncpuTimes0=%v\ncpuTimes1=%v",
measuredElapsed, spinSeconds, cpuTimes0, cpuTimes1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册