Skip to content

Conversation

eric-weaver
Copy link
Contributor

What does this PR do?

Fixes a flaky test by scoping the queries we're filtering for to the specific test that's running. Previously this test could flake due to previously ran queries from other tests still existing in pg_stat_activity table as this cleanup happens on Postgres container async. This became more frequent of an issue after #21173 due to a new test test_commenter_cursor_functionality which has similar functionality goals of test_integration_connection_with_commenter_cursor but scoped to our connection_pool classes connections. Depending on the order that these tests ran we could see incorrect count of queries returning so the first result that we check against would be incorrect. Now we're only looking for queries specifically from this test execution run

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

Copy link

github-actions bot commented Sep 5, 2025

⚠️ 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.

jasonmp85
jasonmp85 previously approved these changes Sep 5, 2025
Copy link

codecov bot commented Sep 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.25%. Comparing base (d444872) to head (ba3bec5).
⚠️ Report is 15 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.

@temporal-github-worker-1 temporal-github-worker-1 bot dismissed jasonmp85’s stale review September 8, 2025 15:36

Review from jasonmp85 is dismissed. Related teams and files:

  • database-monitoring-agent
    • postgres/tests/test_progress_stats.py
    • postgres/tests/utils.py
@eric-weaver eric-weaver added this pull request to the merge queue Sep 8, 2025
Merged via the queue into master with commit dedbd65 Sep 8, 2025
133 of 137 checks passed
@eric-weaver eric-weaver deleted the eric.weaver/fix-flaky-cursor-test branch September 8, 2025 20:09
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