-
Notifications
You must be signed in to change notification settings - Fork 428
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
profiler: TestSetProfileFraction fails when run multiple times #1279
Comments
The profiler doesn't re-set the mutex profile fraction when I think the correct fix will be to change |
TestAllUploaded starts the mutex profiler. Currently the profiler doesn't re-set the profile rate when Stop is called. This causes TestSetProfileFraction/on to fail if it's run after TestAllUploaded since the test checks that the old rate is different than the new rate, but in both cases the rates are the default rate. This commit changes the test to start by setting the rate to 0 and then checking that it's either the default value or still 0 after starting the profiler. This makes the test more isolated and not influenced by what other tests do to the mutex profile fraction. Fixes #1279
TestAllUploaded starts the mutex profiler. Currently the profiler doesn't re-set the profile rate when Stop is called. This causes TestSetProfileFraction/on to fail if it's run after TestAllUploaded since the test checks that the old rate is different than the new rate, but in both cases the rates are the default rate. This commit changes the test to start by setting the rate to 0 and then checking that it's either the default value or still 0 after starting the profiler. This makes the test more isolated and not influenced by what other tests do to the mutex profile fraction. Fixes #1279 Co-authored-by: Felix Geisendörfer <felix@datadoghq.com>
If all of the tests are run multiple times, then
TestProfileFraction
fails in all but the first run:This appears to have been introduced by #1262
The text was updated successfully, but these errors were encountered: