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

Flaky test: TestServiceTelemetryReusable #6449

Closed
codeboten opened this issue Oct 31, 2022 · 3 comments
Closed

Flaky test: TestServiceTelemetryReusable #6449

codeboten opened this issue Oct 31, 2022 · 3 comments
Labels

Comments

@codeboten
Copy link
Contributor

See the failure: https://github.com/open-telemetry/opentelemetry-collector/actions/runs/3362867290/jobs/5575186303#step:6:4285

 2022-10-31T16:16:23.033Z	info	service/service.go:106	Everything is ready. Begin running and processing data.
    service_test.go:179: 
        	Error Trace:	/home/runner/work/opentelemetry-collector/opentelemetry-collector/service/service_test.go:179
        	Error:      	Received unexpected error:
        	            	Get "http://localhost:8888/metrics": dial tcp [::1]:8888: connect: connection refused
        	Test:       	TestServiceTelemetryReusable
--- FAIL: TestServiceTelemetryReusable (0.01s)
@sakshi1215
Copy link
Contributor

@codeboten should we add a retry mechanism during the connection? I think the server might not be ready which might have caused this, lmk your opinions.

@codeboten
Copy link
Contributor Author

@sakshi1215 it's possible a retry would solve this, would be good to confirm that's the root cause first. Another thing that may be causing issues is if the port is being re-used by multiple tests.

@paivagustavo
Copy link
Member

Just hit this in #6423 as well. I could recreate it by running this test multiple times with -test.count=100. And it does seems that the server was not ready yet (it gets started in a go routine, so very possible), we could possibly use assert.Eventually here and check if we can still recreate this failure.

Also agree that we should avoid using a static port here and instead getting an available one.

@github-actions github-actions bot added the Stale label Nov 3, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants