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 nats test panics #1122

Merged
merged 2 commits into from
Jun 30, 2021
Merged

Conversation

sagikazarmark
Copy link
Contributor

The removed log line accessed the listener potentially before it was set which lead to panics. I decided to remove the log line instead of moving it after ReadyForConnections because knowing the address doesn't make much sense and it gets logged if something goes wrong.

The running bit is set way earlier than the listener
that s.Addr returns. This lead to panics on several
occasions when the listener was not yet set.

Moving after ReadyForConnections could be a solution,
but logging the nats server address does not add
much to the test anyway: the address is logged
if there is an error.

Signed-off-by: Mark Sagi-Kazar <[email protected]>
@sagikazarmark sagikazarmark added this to the v0.11.0 milestone Jun 24, 2021
@sagikazarmark sagikazarmark merged commit a119c95 into go-kit:master Jun 30, 2021
@sagikazarmark sagikazarmark deleted the nats-test-panic branch June 30, 2021 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants