Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
https://otwarchive.atlassian.net/browse/AO3-6646
Intermittent test failures in features/works:
Example run, also listed in wiki: features/works/work_share.feature:68 # Scenario: Share URL should not be used for post-login redirect
Example run, also listed in wiki: features/works/work_browse.feature:120 # Scenario: Kudos link from from work browsing leads to full work page
Example run: features/works/work_browse.feature:136 # Scenario: Comments link from from work browsing leads to full work page
Example run: features/works/work_edit.feature:7 # Scenario: You can't edit a work unless you're logged in and it's your work
Example run: features/works/work_edit_multiple.feature:7 # Scenario: I can delete multiple works at once
Example run: features/works/work_browse.feature:11 # Scenario: If works in a listing exceed the maximum search result count,
Purpose
Fix flaky works tests by adding delays in a bunch of places to make sure the caches are expired and in one case, works are posted in the correct order.
For the
Share URL should not be used for post-login redirect
test, the failures are not obviously related to caching. It's checking that it redirects to a work URL, however it redirects to the user page instead. If I manually test on production, it also redirects to the user page. Based on the test name, #3815 (comment) and https://otwarchive.atlassian.net/browse/AO3-5907?focusedCommentId=356446, this is acceptable. The intention is to check that it doesn't redirect to the share page. So I modified the test to check that it's not the share URL, without caring for which actual URL (work or user) it ends up being.Testing Instructions
No manual QA required. 50 runs of the tests all passing: once and again.
Credit
Bilka (he/him)