From 751cf0d4eb77d69534dabeff0f3afb2a0eb8588c Mon Sep 17 00:00:00 2001 From: Kale Blankenship Date: Thu, 21 Jun 2018 17:06:17 -0700 Subject: [PATCH] Fix compile error on 386 and run unit tests with GOARCH=386 in CI --- Makefile | 7 ++++++- client.go | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8eaf6933..57f7f5f2 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,12 @@ test: go test -tags gofuzz -v -race ./... integration: - go test -tags "integration pkgerrors" -count=1 -v -race ./... + go test -tags "integration pkgerrors" -count=1 -v -race . + +test386: + TEST_CORPUS=1 go test -tags "gofuzz" -count=1 -v . + +ci: test386 coverage coverage: TEST_CORPUS=1 go test -tags "integration gofuzz" -cover -coverprofile=cover.out -v diff --git a/client.go b/client.go index e0f5d80c..ab7b4683 100644 --- a/client.go +++ b/client.go @@ -194,7 +194,7 @@ func SessionMaxLinks(n int) SessionOption { if n < 1 { return errorNew("max sessions cannot be less than 1") } - if n > 4294967296 { + if int64(n) > 4294967296 { return errorNew("max sessions cannot be greater than 4294967296") } s.handleMax = uint32(n - 1)