Clean up scheduled executor lifecycle in ProfilerGlobalCooldownTest#4732
Draft
Copilot wants to merge 7 commits into
Draft
Clean up scheduled executor lifecycle in ProfilerGlobalCooldownTest#4732Copilot wants to merge 7 commits into
Copilot wants to merge 7 commits into
Conversation
- Creating/Touching a file at a well known location, by default "<temp_dir>/applicationinsights-agent-profile-trigger" - Add a JMX mbean, can be called via "jcmd <pid> MBean.invoke com.microsoft:type=AI-alert,name=ProfilerControl triggerProfile" - Add a global cooldown on the profile to ensure that we dont get repeat profiles from multiple sources
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: johnoliver <1615532+johnoliver@users.noreply.github.com>
Co-authored-by: johnoliver <1615532+johnoliver@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix code according to review comment
Clean up scheduled executor lifecycle in ProfilerGlobalCooldownTest
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ProfilerGlobalCooldownTestcreated a scheduled thread pool per test and never shut it down. SinceprofileAndUpload()schedules delayed work on that executor, the test could leave background tasks running and become timing-sensitive.Scope
ProfilerGlobalCooldownTestExecutor lifecycle
@AfterEachso no background work survives the testEffect