Skip to content

fix(reports): make report-type query tests hermetic for parallel runs - #447

Open
Janekk wants to merge 1 commit into
project/mpi-backendfrom
fix/report-tests-hermetic-xdist
Open

fix(reports): make report-type query tests hermetic for parallel runs#447
Janekk wants to merge 1 commit into
project/mpi-backendfrom
fix/report-tests-hermetic-xdist

Conversation

@Janekk

@Janekk Janekk commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

The allReportTypes query tests asserted on migration-seeded ReportType rows (counts of 8/11). Any TransactionTestCase in the suite truncates those rows (Django does not restore migration data without serialized_rollback), so under pytest-xdist the wipe can land before these tests on a shared worker DB, making them flaky.

Create and assert on the tests' own ReportType rows (explicit keys, membership assertions) instead of the seeded defaults, so they are order- and scheduler-independent.

The allReportTypes query tests asserted on migration-seeded ReportType
rows (counts of 8/11). Any TransactionTestCase in the suite truncates
those rows (Django does not restore migration data without
serialized_rollback), so under pytest-xdist the wipe can land before
these tests on a shared worker DB, making them flaky.

Create and assert on the tests' own ReportType rows (explicit keys,
membership assertions) instead of the seeded defaults, so they are
order- and scheduler-independent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: baadc40a-854d-42d9-aaff-6983d98f01df

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants