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 distribution system specs #4869

Merged

Conversation

coalest
Copy link
Collaborator

@coalest coalest commented Dec 19, 2024

Resolves #4381

Description

We were saving a new distribution (which causes a redirect to that distribution's show page) and then immediately clicking on the distributions index page (which redirects as well). This introduced a race condition that was flaky when we tried to click a link that didn't exist on the page we were on.

Type of change

  • Internal (only related to tests)

How Has This Been Tested?

I was actually able to reproduce this failure locally, so it was a little easier to test. I ran the three specs that use the faulty before block multiple times before and after this change. (Using a simple bash script to run the test multiple times: for i in {1..20}; do ber spec/system/distribution_system_spec.rb:559; done;)

Before the change:
5 failing specs out of 60.

After the change:
0 failing specs out of 60.

We were saving a new distribution (which causes a redirect to that
distribution's show page) and then immediately clicking on the distributions
index page (which redirects as well). This introduced a race condition that
was flaky when we tried to click a link that didn't exist on the page.
@dorner dorner merged commit 0df6963 into rubyforgood:main Dec 19, 2024
11 checks passed
Copy link
Contributor

@coalest: Your PR Fix flaky distribution system specs is part of today's Human Essentials production release: 2024.12.22.
Thank you very much for your contribution!

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.

Flaky distribution test
2 participants