Tests: Fix module/nomodule tests flakiness#5699
Merged
mgol merged 2 commits intojquery:mainfrom Sep 15, 2025
Merged
Conversation
timmywil
reviewed
Sep 15, 2025
timmywil
reviewed
Sep 15, 2025
timmywil
reviewed
Sep 15, 2025
timmywil
reviewed
Sep 15, 2025
timmywil
reviewed
Sep 15, 2025
The module/nomodule tests are the most flaky ones, contributing significantly to increase number of test failures (somewhat mitigated by auto-retries). Fix flakiness of module/nomodule tests: 1. For module tests, increase the timeout to 5 seconds. In order for most tests to not wait that long, change callbacks called by module scripts to verify the results as soon as all scripts have run. 2. For nomodule tests, run the check in 1 second. All modern browsers will need to wait that long, hence a smaller timeout, and if occasionally the check runs too quickly, the test will still pass.
cc6495b to
14f12fa
Compare
timmywil
approved these changes
Sep 15, 2025
mgol
added a commit
that referenced
this pull request
Sep 15, 2025
The module/nomodule tests are the most flaky ones, contributing significantly to increase number of test failures (somewhat mitigated by auto-retries). Fix flakiness of module/nomodule tests: 1. For module tests, increase the timeout to 5 seconds. In order for most tests to not wait that long, change callbacks called by module scripts to verify the results as soon as all scripts have run. 2. For nomodule tests, run the check in 1 second. All modern browsers will need to wait that long, hence a smaller timeout, and if occasionally the check runs too quickly, the test will still pass. Closes gh-5699 (cherry picked from commit 5964acf)
mgol
added a commit
that referenced
this pull request
Sep 15, 2025
In IE, these tests are expected to be executed, so the timeout can be higher, similar to how we set a high timeout for module tests. Ref gh-5699
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The module/nomodule tests are the most flaky ones, contributing significantly to increase number of test failures (somewhat mitigated by auto-retries).
Fix flakiness of module/nomodule tests:
Checklist
New tests have been added to show the fix or feature worksIf needed, a docs issue/PR was created at https://github.com/jquery/api.jquery.com