Skip to content

Comments

Fix nats test panics#1122

Merged
sagikazarmark merged 2 commits intogo-kit:masterfrom
sagikazarmark:nats-test-panic
Jun 30, 2021
Merged

Fix nats test panics#1122
sagikazarmark merged 2 commits intogo-kit:masterfrom
sagikazarmark:nats-test-panic

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 <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
@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