[v0.21.x-branch] Backport #11206: invoices: bound rapid migration test workload - #11215
Merged
Merged
Conversation
Run the SQLite and Postgres property checks as isolated subtests, close each database after its check, and migrate a bounded batch of randomized invoices per Rapid iteration. This preserves multi-invoice transaction coverage while preventing the accidental 100-by-100 workload from exhausting the Postgres fixture under the race detector. (cherry picked from commit 381faa6)
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.
Backport of #11206
Change
TestMigrateSingleInvoiceRapidperformed Rapid's default 100 property checks,but generated and migrated another 100 invoices inside every check for both
SQLite and Postgres. The resulting 20,000 migrations and delayed database
cleanup made the race build exceed the Postgres fixture's fixed ten-minute
lifetime.
covers only Postgres checks.
retaining every handle until the outer test exits.
retains multiple migrations in one transaction and post-commit lookup
coverage while replacing the accidental 100-by-100 multiplier with 1,000
generated invoices per backend.
This addresses the repeated race-job timeout observed after the Go 1.27.1
toolchain update in #11200 without increasing the fixture timeout.
Verification
TestMigrateSingleInvoiceRapid: pass in 142.330s.make lint-native: 0 issues.