Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14550 from tgxworld/fix_failing_enum_test_random_…
…order Allow postgresql enum_test to be run in random order.
- Loading branch information
Showing
3 changed files
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module PostgresqlHelper | ||
# Make sure to drop all cached query plans to prevent invalid reference errors like: | ||
# cache lookup failed for type XYZ | ||
def reset_pg_session | ||
original_connection = ActiveRecord::Base.remove_connection | ||
ActiveRecord::Base.establish_connection(original_connection) | ||
end | ||
end |