go-resty / resty

Simple HTTP and REST client library for Go
MIT License
10.12k stars 710 forks source link

TestClientRetryWaitCallbackSwitchToDefault fails on 32-bit systems #386

Closed creekorful closed 3 years ago

creekorful commented 4 years ago

Hello there,

I've packaged your library on Debian, and some tests are failing:

The test TestClientRetryWaitCallbackSwitchToDefault pass on 64-bit systems, but fails on 32-bit systems, such as i386, armhf. It has been reported on Debian.

One can easily reproduce the error locally by doing something like this:

$ GOARCH=386 go test -v ./... -run TestClientRetryWaitCallbackSwitchToDefault -count=1

Error log:

=== RUN   TestClientRetryWaitCallbackSwitchToDefault
    resty_test.go:41: Method: GET
    resty_test.go:42: Path: /set-retrywaittime-test
    resty_test.go:41: Method: GET
    resty_test.go:42: Path: /set-retrywaittime-test
    resty_test.go:41: Method: GET
    resty_test.go:42: Path: /set-retrywaittime-test
    resty_test.go:41: Method: GET
    resty_test.go:42: Path: /set-retrywaittime-test
    resty_test.go:41: Method: GET
    resty_test.go:42: Path: /set-retrywaittime-test
    resty_test.go:41: Method: GET
    resty_test.go:42: Path: /set-retrywaittime-test
    retry_test.go:477: Client has slept 1.329608 seconds before retry 3
--- FAIL: TestClientRetryWaitCallbackSwitchToDefault (9.74s)

See:

creekorful commented 3 years ago

Hello,

I have uploaded my patch and now the package builds fine on i386, but not armhf. You can view build status here.

I'll take a look this week,

Cheers