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

Fix racy tests and enable race detection on travis #14

Open
stoewer opened this issue Oct 5, 2017 · 8 comments
Open

Fix racy tests and enable race detection on travis #14

stoewer opened this issue Oct 5, 2017 · 8 comments

Comments

@stoewer
Copy link
Owner

stoewer commented Oct 5, 2017

When tests are run with go test -race several race conditions are detected (see #7). Those race conditions must be fixed.

To avoid racy tests in the future the -race flag should be enabled for all tests in the .travis.yaml file.

@marcosinger
Copy link

@stoewer do you still need any help with this? I can give it a shot if you wish :)

@stoewer
Copy link
Owner Author

stoewer commented Oct 8, 2017

Hi @marcosinger, that would be great!

@marcosinger
Copy link

@stoewer I'm having a bad time to configure Nakadi server on macOS.. after googling while it's running but I'm getting a duplicated key error running Go tests.. I can post a screenshot here if it helps, but do you have any clue on top your head about this issue?!

@stoewer
Copy link
Owner Author

stoewer commented Oct 16, 2017

The integration tests and the tests examples create event types before the tests and remove them afterwards. However, if tests are interrupted the created event types or subscriptions might still exist on Nakadi. I guess this is the most likely explanation for the duplicated keys. The solution is just to stop Nakadi docker rm all existing Nakadi containers (especially postgres) and start a fresh instance of Nakadi.

You can check if the event type still exists with the GET /event-types endpoint. I hope this helps.

@stoewer
Copy link
Owner Author

stoewer commented Oct 25, 2017

@marcosinger Are you still working on this one?

@marcosinger
Copy link

@stoewer I'm still getting a bunch of errors from Nakadi server and the tests aren't passing :(
I hacked the ./gradlew startNakadi script a little bit and some errors are gone, but it is not running smoothly.

To not block it you could get this issue back to you, if you wish.

@stoewer
Copy link
Owner Author

stoewer commented Oct 25, 2017

@marcosinger The problem with Nakadi's docker compose setup is known but apparently not solved right now. There is a pull request that tries to solve it, but it still has errors.

Since I would really like to turn race detection on, I'd take this one over. If this is OK?

@marcosinger
Copy link

@stoewer go for it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants