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

[chore] avoid flaky test by using port 0 #10678

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented Jul 20, 2024

Description

Use port zero since we just start and stop the server.

Link to tracking issue

Fixes #9772

@atoulme atoulme requested a review from a team as a code owner July 20, 2024 05:40
@atoulme atoulme requested a review from songy23 July 20, 2024 05:40
Copy link

codecov bot commented Jul 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.38%. Comparing base (49339e8) to head (305545f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10678   +/-   ##
=======================================
  Coverage   92.38%   92.38%           
=======================================
  Files         403      403           
  Lines       18722    18722           
=======================================
  Hits        17296    17296           
  Misses       1066     1066           
  Partials      360      360           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@atoulme
Copy link
Contributor Author

atoulme commented Jul 25, 2024

@codeboten please review?

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

@atoulme are there other places in the code where this should be changed then?

@codeboten codeboten merged commit ef7f285 into open-telemetry:main Jul 25, 2024
52 checks passed
@github-actions github-actions bot added this to the next release milestone Jul 25, 2024
@atoulme
Copy link
Contributor Author

atoulme commented Jul 25, 2024

@atoulme are there other places in the code where this should be changed then?

yes, there is at least another flaky test that leverages and reuses the same port in between runs, but it specifically tests telemetry and makes calls to the server, which makes things more difficult to move over to this model.
See

for i := 0; i < 2; i++ {
specifically

@atoulme atoulme deleted the use_port_zero branch July 25, 2024 19:36
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.

[receiver/otlp] Flaky test: TestCreateMetricReceiver/default
3 participants