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

tests: address randomness-related failures #15469

Merged
merged 5 commits into from
Feb 23, 2024

Conversation

miketheman
Copy link
Member

Refs: #15398

The `_simple_detail()` function has sorted the results by version, then
filename, so update test conditions to sort similarly as well.

Exposed with:
--randomly-seed=105155306
--randomly-seed=1843708888
--randomly-seed=19699634

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Other tests paginating expect a page-like object instead of the list of
items, so supply one.

Exposed via:
--randomly-seed=3227833760
--randomly-seed=235656747

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
When using `factory.Sequence()` for a database-controlled sequence
column, we can get into a weird state where we're reusing the sequence
since we've flushed already.

Since we already rely on the database to generate the ID for us, we
don't have to supply it ourselves as part of the factory. If we ever
*do* want to set a specific id for a JournalEntry, we would use a
keyword argument like `JournalEntryFactory.create(id=...)`

Exposed via:
--randomly-seed=2329742959

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@miketheman miketheman requested a review from a team as a code owner February 23, 2024 21:41
@miketheman miketheman added the testing Test infrastructure and individual tests label Feb 23, 2024
@miketheman miketheman merged commit 874c3b2 into pypi:main Feb 23, 2024
17 checks passed
@miketheman miketheman deleted the miketheman/testing-randomness branch February 23, 2024 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Test infrastructure and individual tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants