-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix flaky postgres test #7228
Fix flaky postgres test #7228
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7228 +/- ##
==========================================
- Coverage 94.03% 94.01% -0.03%
==========================================
Files 172 172
Lines 12913 12913
==========================================
- Hits 12143 12140 -3
- Misses 770 773 +3
Continue to review full report at Codecov.
|
Do you have to use an extension for this? |
Trying to see if I can install the extension directly for Postgres 10 and 11, seems to already be included in 13 (and I think 12) |
I just realized that the Contributing Guide need to be updated for testing against Postgres like creating database and proper extensions. |
The contributing guide shows how to add the correct extensions for regular usecases |
Which line? |
137 to 139 I always copy paste from the Contributing guide when testing to make sure it's still valid |
I see, I was looking at the old travis reference that is in there. |
I can update this here since I'm adding the pgcrypto extension |
@dplewis test look all good. I'm assuming I don't need to add a changelog entry for a test fix? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
🎉 This change has been released in version 5.0.0-beta.1 |
🎉 This change has been released in version 5.0.0 |
New Pull Request Checklist
Issue Description
I introduced a flaky test in #6506 where MD5 was used to create random strings. The problem here is these strings are used for values on a unique index and MD5 generates clashes easily as the strings are not promised to be unique.
Related issue: Flaky tests
Approach
Use postgres
gen_random_uuid()
instead of MD5 for random strings since they are guaranteed to be unique, especially for the amount generated in the tests (5000).TODOs before merging