mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-23 17:16:40 +01:00
Fix test on Windows (with 1 CPU)
This commit is contained in:
parent
e625c7c051
commit
0a3f68f0d7
1 changed files with 3 additions and 2 deletions
5
dist/automate_test.go
vendored
5
dist/automate_test.go
vendored
|
@ -6,8 +6,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNumProcs(t *testing.T) {
|
func TestNumProcs(t *testing.T) {
|
||||||
|
num := runtime.NumCPU()
|
||||||
n := numProcs()
|
n := numProcs()
|
||||||
if n != runtime.NumCPU()-1 {
|
if num > 1 && n != num-1 {
|
||||||
t.Errorf("Expected numProcs to return NumCPU-1, got %d", n)
|
t.Errorf("Expected numProcs to return max(NumCPU-1, 0) but got %d (NumCPU=%d)", n, num)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue