Skip to content

fix flakey test_agent_jobs_integration#22833

Merged
eric-weaver merged 1 commit intomasterfrom
eric.weaver/test_agent_jobs_integration
Mar 9, 2026
Merged

fix flakey test_agent_jobs_integration#22833
eric-weaver merged 1 commit intomasterfrom
eric.weaver/test_agent_jobs_integration

Conversation

@eric-weaver
Copy link
Copy Markdown
Contributor

What does this PR do?

  • Fix flaky test_agent_jobs_integration by making it self-contained instead of implicitly depending on test_history_output having run first
  • The test was failing with Cannot insert the value NULL into column 'job_id' because ACTIVITY_INSERTION_QUERY references '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, -k filtering, or a prior test failure caused test_agent_jobs_integration to run without test_history_output completing first, the subquery returned NULL and the INSERT failed.

Motivation

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 6, 2026

⚠️ Recommendation: Add qa/skip-qa label

This PR does not modify any files shipped with the agent.

To help streamline the release process, please consider adding the qa/skip-qa label if these changes do not require QA testing.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.39%. Comparing base (9bad3d6) to head (5c994cf).
⚠️ Report is 32 commits behind head on master.

Additional details and impacted files
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@eric-weaver eric-weaver added this pull request to the merge queue Mar 9, 2026
Merged via the queue into master with commit 6430061 Mar 9, 2026
81 of 89 checks passed
@eric-weaver eric-weaver deleted the eric.weaver/test_agent_jobs_integration branch March 9, 2026 14:44
lukepatrick pushed a commit to lukepatrick/integrations-core that referenced this pull request Mar 17, 2026
Signed-off-by: lukepatrick <lukephilips@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants