Skip to content

Use a transaction in the migration test#3329

Merged
dnephin merged 2 commits intomainfrom
dnephin/use-txn-in-migration-test
Sep 26, 2022
Merged

Use a transaction in the migration test#3329
dnephin merged 2 commits intomainfrom
dnephin/use-txn-in-migration-test

Conversation

@dnephin
Copy link
Contributor

@dnephin dnephin commented Sep 26, 2022

Summary

#3157 added a transaction for migrations, but I missed adding it to the test function.

This PR adds a transaction for each test case. I used a separate transaction for migrate and expected because using the same transaction seem to produce a different error than the one we saw in production. This transaction setup should match production, because we commit the transaction used for migrations before performing any other query.

Includes some fixes that will likely be merged before this, so I'll rebase once those are in.

{
label: testCaseLine("202206281027"),
setup: func(t *testing.T, db WriteTxn) {
t.Skip("this migration no longer works with transactions")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should add a TODO here to fix later

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya, I wonder if we should fix this, or remove it since it's an old migration.

Copy link
Collaborator

@BruceMacD BruceMacD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and validated locally

@dnephin dnephin merged commit 5c88fdd into main Sep 26, 2022
@dnephin dnephin deleted the dnephin/use-txn-in-migration-test branch September 26, 2022 20:33
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.

3 participants