Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only create parallel test databases on schema changes #36826

Closed
wants to merge 4 commits into from

Conversation

jhawthorn
Copy link
Member

This introduces a new key in the ar_internal_metadata table, :schema_sha1, which tracks the SHA1 of the schema file being loaded into the database.

This can be used to keep a test database exactly in sync with a schema file. This is similar to the maintain_test_schema functionality non-parallel tests currently use, but is more accurate (migrations can be changed or rolled back). I plan to update maintain_test_schema to use this instead in a future PR.

This adjusts parallelization test databases hook to only reload the schema when it has changed, and to no longer drop the database at exit.

Refs #36807

@jhawthorn jhawthorn changed the title Only create N parallel test databases when schema changes Only create parallel test databases on schema changes Jul 31, 2019
@jhawthorn
Copy link
Member Author

Closing for #36873

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.

None yet

1 participant