mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-30 23:53:48 +03: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) {
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue