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

fix flaky test for user notification task #17676

Merged
merged 3 commits into from
Feb 28, 2025
Merged

fix flaky test for user notification task #17676

merged 3 commits into from
Feb 28, 2025

Conversation

ewdurbin
Copy link
Member

followup to #17662, in batch size test... just test batch size

ordering in the query won't necessarily match ordering of usernames... so just compare call counts. the other tests ensure the right users arenotified, let this one just look at the batch size

followup to #17662, in batch size test... just test batch size

ordering in the query won't necessarily match ordering of usernames... so just compare call counts. the other tests ensure the right users arenotified, let this one just look at the batch size
@ewdurbin ewdurbin requested a review from a team as a code owner February 28, 2025 12:47
@ewdurbin ewdurbin force-pushed the flaky_tos_tests_round_2 branch from 7509f5c to 79dfe26 Compare February 28, 2025 13:11
users_to_notify = UserFactory.create_batch(20, with_verified_primary_email=True)
UserFactory.create_batch(max(1, batch_size * 2), with_verified_primary_email=True)
Copy link
Member

Choose a reason for hiding this comment

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

It took me far longer than it should have to realize that the parametrized input was 10 not 20, and I kept trying to figure out why you were multiplying it by two.
Using max() is a nifty way to make the input of 0 work.

@di di enabled auto-merge (squash) February 28, 2025 14:48
@di di merged commit d028de2 into main Feb 28, 2025
20 checks passed
@di di deleted the flaky_tos_tests_round_2 branch February 28, 2025 14:51
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