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 Flaky Test in AWS X-Ray Remote Sampler Client Test #202

Closed
wants to merge 4 commits into from

Conversation

jj22ee
Copy link
Contributor

@jj22ee jj22ee commented Jun 5, 2024

Issue #, if available:
(Recreated PR to trigger Analyzer Checks)

This PR fixes flaky test test_urls_excluded_from_sampling, causing issues in PR workflows

Instantiation of AwsXRayRemoteSampler will spawn processes that will regularly (every 10s and 300s) make a Request call, and these processes stay alive between different unit tests. This means that the test that counts the number instrumented Request calls is affected by these "orphaned" processes.

The solution is to stop these processes inside the tests that they are created from, or stop them from being spawned in the first place if they are not needed.

Description of changes:

  • Stop the daemon rule and target poller processes inside the tests that they are created from, or stop them from being spawned in the first place if they are not needed.
  • Revert previous fix attempt
  • Add test for version to increase and pass code coverage

Testing:

  • Reproduced failing test by running test in loop of 10000 runs
  • Failing test not reproducible after applying fix.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jj22ee jj22ee requested a review from a team as a code owner June 5, 2024 00:24
@jj22ee jj22ee closed this Jun 5, 2024
@thpierce thpierce deleted the fix-sampler-client-test branch June 13, 2024 18:52
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.

1 participant