Commit 0a3f68f0 authored by Matthew Holt's avatar Matthew Holt

Fix test on Windows (with 1 CPU)

parent e625c7c0
......@@ -6,8 +6,9 @@ import (
)
func TestNumProcs(t *testing.T) {
num := runtime.NumCPU()
n := numProcs()
if n != runtime.NumCPU()-1 {
t.Errorf("Expected numProcs to return NumCPU-1, got %d", n)
if num > 1 && n != num-1 {
t.Errorf("Expected numProcs to return max(NumCPU-1, 0) but got %d (NumCPU=%d)", n, num)
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment