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 OTLP testing flake: signal connection from mock collector #1816

Merged
merged 6 commits into from
Apr 17, 2021

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Apr 15, 2021

Add a TCP Listener implementation to the mock collector that signals when it receives a connection. Use this signaling in testing to wait for re connections to deterministically happen instead of waiting an arbitrary time and hoping it happens.

Validated this fix here.

Resolve #1527

The mock collector listener now signals when it receives a connection
instead of waiting an arbitrary time an hoping the event happens.
@MrAlias MrAlias added bug Something isn't working pkg:exporter:otlp Related to the OTLP exporter package labels Apr 15, 2021
Copy link
Contributor

@MadVikingGod MadVikingGod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I will be happy to rid ourselves of a flaky test.

exporters/otlp/otlpgrpc/mock_collector_test.go Outdated Show resolved Hide resolved
Copy link
Member

@XSAM XSAM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@MrAlias MrAlias merged commit d9566ab into open-telemetry:main Apr 17, 2021
@MrAlias MrAlias deleted the otlp-test-wrap branch April 17, 2021 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:exporter:otlp Related to the OTLP exporter package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky test: TestNewExporter_collectorConnectionDiesThenReconnects
4 participants