DEBUG-4548 Fix global state dependency in crashtracking and process discovery tests #5175
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds state resets to crash tracking and process discovery tests
Motivation:
Existing tests are failing with the changes in #5159
Change log entry
None
Additional Notes:
We already have tests in master for after fork money patcher that reset the list of registered after fork handlers (such as the ones set by crash tracking and process discovery). Why these have not ever failed is a mystery to me. Maybe this has to do with how tests are grouped in CI.
Regardless, in #5159 I now use the monkey patcher for telemetry and this is causing test failures because crash tracking and process discovery assume that their after fork handlers have been installed somehow (and they usually get installed by the library itself when it gets loaded, or coincidentally by other tests in my local test runs) but the resets in telemetry and/or the monkey patch unit tests themselves clear out those handlers.
This PR adds state resets to the existing tests.
How to test the change?
Existing CI + #5159