Skip to content

Fix flakey tests #2564

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Fix flakey tests #2564

wants to merge 5 commits into from

Conversation

banderous
Copy link
Contributor

@banderous banderous commented Apr 23, 2025

  1. Race condition in Elasticsearch tests between indexing and test assertions
  2. Mutation of test context that could cause downstream tests to fail (fixed with @DirtiesContext)
  3. shouldRetryOnErrorWithIgnoreWarningFalseAndDefaultRetryContext

shouldRetryOnErrorWithIgnoreWarningFalseAndDefaultRetryContext This test relies on tight timings which causes it to regularly fail.

The final request had a delay of 490ms which is close to the 500ms http timeout the test configures. The test scenario doesn't require any delay for the final request which is expected to succeed so can be removed.

…text

This test relies on tight timings which causes it to regularly fail.
The final request had a delay of 490ms which is close to the 500ms
http timeout the test configures. The test scenario doesn't require a
delay for the final request.
Alex McAusland added 2 commits April 24, 2025 20:21
Ensure we wait for indexing to finish before proceeding with tests.
The DocumentsOperationTest modifies the spring boot test context using
field level reflection which was breaking other tests.

@DirtiesContext ensures this modified context is not reused in
subsequent tests.
@banderous banderous changed the title Fix flakey test - shouldRetryOnErrorWithIgnoreWarningFalseAndDefaultRetryContext Fix flakey tests Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants