cmd/utils: Remove syscall.Rlimit in test

This commit is contained in:
lash 2017-12-19 18:10:28 +01:00
parent 500b44cbdb
commit 067c11c7ff

View file

@ -18,7 +18,6 @@ package utils
import ( import (
"fmt" "fmt"
"syscall"
"testing" "testing"
) )
@ -26,13 +25,12 @@ import (
// per this process can be retrieved. // per this process can be retrieved.
func TestFileDescriptorLimits(t *testing.T) { func TestFileDescriptorLimits(t *testing.T) {
target := 4096 target := 4096
var limit syscall.Rlimit
hardlimit, err := getFdMaxLimit() hardlimit, err := getFdMaxLimit()
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
if hardlimit < target { if hardlimit < target {
t.Skip(fmt.Sprintf("system limit is less than desired test target: %d < %d", limit.Max, target)) t.Skip(fmt.Sprintf("system limit is less than desired test target: %d < %d", hardlimit, target))
} }
if limit, err := getFdLimit(); err != nil || limit <= 0 { if limit, err := getFdLimit(); err != nil || limit <= 0 {