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

move the failure to connect message until after shutdown state check #58

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

ettec
Copy link
Contributor

@ettec ettec commented Mar 25, 2024

Reasoning behind the change:

From BCF-3112, we see this panic in the logs:

panic: Log in goroutine after TestTelemetryIngressClient_Send_HappyPath has completed: 2024-03-

The wsrpc client runs 'resetTransport' in a goroutine, the routine does check that the state of the client in not in shutdown before attempting to reconnect, however, whilst attempting to connect the state can be changed to shutdown if the client is 'closed' (ie by, in this case, the test exiting). Thus, if the createTransport call errors (as is likely in the test shutdown scenario) the client will attempt to log the connection error. The fix is straightforward and no risk -> move the log until after the existing state check, not logging the error in the case where the client is in 'shutdown' state seems sensible.

@cedric-cordenier cedric-cordenier merged commit 6b0ade1 into main Mar 25, 2024
6 of 7 checks passed
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.

4 participants