fix flakey test_agent_jobs_integration#22833
Merged
eric-weaver merged 1 commit intomasterfrom Mar 9, 2026
Merged
Conversation
Contributor
|
This PR does not modify any files shipped with the agent. To help streamline the release process, please consider adding the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files🚀 New features to boost your workflow:
|
sethsamuel
approved these changes
Mar 9, 2026
dkirov-dd
pushed a commit
that referenced
this pull request
Mar 11, 2026
NouemanKHAL
pushed a commit
that referenced
this pull request
Mar 13, 2026
lukepatrick
pushed a commit
to lukepatrick/integrations-core
that referenced
this pull request
Mar 17, 2026
Signed-off-by: lukepatrick <lukephilips@gmail.com>
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.
What does this PR do?
test_agent_jobs_integrationby making it self-contained instead of implicitly depending ontest_history_outputhaving run firstCannot insert the value NULL into column 'job_id'becauseACTIVITY_INSERTION_QUERYreferences'Job 2'via a subquery (SELECT job_id FROM msdb.dbo.sysjobs WHERE name = 'Job 2'), but'Job 2'was only created inside a separate test (test_history_output). When test ordering,-kfiltering, or a prior test failure causedtest_agent_jobs_integrationto run withouttest_history_outputcompleting first, the subquery returned NULL and the INSERT failed.Motivation
Review checklist (to be filled by reviewers)
qa/skip-qalabel if the PR doesn't need to be tested during QA.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged