Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

race in examples #113

Closed
kamilsk opened this issue Feb 18, 2018 · 0 comments
Closed

race in examples #113

kamilsk opened this issue Feb 18, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@kamilsk
Copy link
Owner

kamilsk commented Feb 18, 2018

make test
go list ./... | grep -v vendor | grep -v ^_ | xargs go test -race 
==================
WARNING: DATA RACE
Read at 0x00c42008e4d8 by goroutine 62:
  github.com/kamilsk/retry_test.Example_httpClient.func1()
      /Users/kamilsk/Development/go/src/github.com/kamilsk/retry/example_http_client_test.go:43 +0x4a
  net/http.HandlerFunc.ServeHTTP()
      /usr/local/Cellar/go/1.10/libexec/src/net/http/server.go:1947 +0x51
  net/http.serverHandler.ServeHTTP()
      /usr/local/Cellar/go/1.10/libexec/src/net/http/server.go:2694 +0xb9
  net/http.(*conn).serve()
      /usr/local/Cellar/go/1.10/libexec/src/net/http/server.go:1830 +0x7dc

Previous write at 0x00c42008e4d8 by goroutine 57:
  github.com/kamilsk/retry_test.Example_httpClient.func1()
      /Users/kamilsk/Development/go/src/github.com/kamilsk/retry/example_http_client_test.go:47 +0xd9
  net/http.HandlerFunc.ServeHTTP()
      /usr/local/Cellar/go/1.10/libexec/src/net/http/server.go:1947 +0x51
  net/http.serverHandler.ServeHTTP()
      /usr/local/Cellar/go/1.10/libexec/src/net/http/server.go:2694 +0xb9
  net/http.(*conn).serve()
      /usr/local/Cellar/go/1.10/libexec/src/net/http/server.go:1830 +0x7dc

Goroutine 62 (running) created at:
  net/http.(*Server).Serve()
      /usr/local/Cellar/go/1.10/libexec/src/net/http/server.go:2795 +0x364
  net/http/httptest.(*Server).goServe.func1()
      /usr/local/Cellar/go/1.10/libexec/src/net/http/httptest/server.go:280 +0xa2

Goroutine 57 (running) created at:
  net/http.(*Server).Serve()
      /usr/local/Cellar/go/1.10/libexec/src/net/http/server.go:2795 +0x364
  net/http/httptest.(*Server).goServe.func1()
      /usr/local/Cellar/go/1.10/libexec/src/net/http/httptest/server.go:280 +0xa2
==================
FAIL
FAIL    github.com/kamilsk/retry        0.685s
ok      github.com/kamilsk/retry/backoff        1.024s
ok      github.com/kamilsk/retry/classifier     1.029s
ok      github.com/kamilsk/retry/cmd/retry      1.047s
ok      github.com/kamilsk/retry/jitter 1.024s
ok      github.com/kamilsk/retry/strategy       1.185s
@kamilsk kamilsk self-assigned this Feb 18, 2018
@kamilsk kamilsk added this to the retry 3.0 milestone Feb 18, 2018
kamilsk added a commit that referenced this issue Feb 18, 2018
… add go1.10; fix #113: fix rstrange race in example
@kamilsk kamilsk closed this as completed Feb 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant