Fix a couple imports and a float comparison test
This commit is contained in:
@@ -82,7 +82,7 @@ func testCPUPercent(t *testing.T, percpu bool) {
|
||||
t.Errorf("error %v", err)
|
||||
}
|
||||
for _, percent := range v {
|
||||
if percent < 0.0 || percent > 100.0*float64(numcpu) {
|
||||
if percent < 0.0 || int(percent) > 100*numcpu {
|
||||
t.Fatalf("CPUPercent value is invalid: %f", percent)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user