-
Notifications
You must be signed in to change notification settings - Fork 46
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 flaky tests #685
Comments
@ethanfrey So I have investigated why this happens and it's this:
A good explanation here: https://eklitzke.org/binding-on-port-zero. |
I think we explicitly set the port 0.0.0.0:33358 or do we not??? Either we make sure to explicitly set the port differently for each run of tendermint to avoid timing issues, or figure out why port 0 returning odd locations. Let's see if this happens again in the CI though, as no need to waste time on a fluke occurance |
@ethanfrey nope, this is being done by
in |
okay, gotcha here. I will close this issue unless it happens a few more times (then please reopen) |
@ethanfrey I mark this now as blocked. However, introducing one retry (or configurable retries) to bind to port 0 in tendermint would result in this being consistently . |
I have been looking at the wrong test. So it turns out we are calling
This is likely the cause of collisions, because GetFreePort just checks if the port is free and then releases it, so it's likely we get the same port. We should let tendermint do it instead or get these ports ourselves by stealing that code and enhancing it to return several ports. I will get this fixed. |
I have taken a look at how tendermint does it - and they have the same approach. I have tried to port our code to use such approach, but that means duplicating a lot of tendermint's test setup and does not look like a good way forward. I'm going to comment on my original tendermint issue. |
https://travis-ci.com/iov-one/weave/jobs/203494342
The text was updated successfully, but these errors were encountered: