Skip to content

QA-JV-105 — waitForTimeout hard sleep ​

← Back to the rule catalog

Generated from the rule registry. Get the same detail from the CLI with mjolnir explain QA-JV-105.

FieldValue
Severitywarning
Confidencehigh
Tierextended
Measured FP rate10% (n=20)
Evidence levelE2
QA impactFlaky-test risk (FLAKY-RISK)
False-positive risk (author estimate)low
Autofix availableno
Languagesjava
Frameworksjunit, testng, playwright
Detection strategyQA_MODEL
Introduced inv0.3.8

Why this fails in production ​

Fixed waits encode hope, not synchronization — too short flakes under load, too long slows every run.

What gets flagged (real detector output) ​

`waitForTimeout()` hard sleep.

Example from this rule's own must-fire fixture: tests/fixtures/QA-JV-105/must-fire/ModalTest.java

The fix ​

Use page.locator(...).waitFor() or assertThat(locator).isVisible() with auto-waiting.

Confirmed NOT to fire on the corresponding clean pattern ​

Verified against tests/fixtures/QA-JV-105/must-not-fire/ModalTest.java — a legitimate, similar-looking pattern this rule correctly leaves alone.

Corpus-measured false-positive risk ​

Real occurrence counts from npm run corpus:audit against actively-maintained OSS repos — reproduce yourself, don't just trust this table (see the false-positive audit):

RepoOccurrences
microsoft-playwright-java40

Released under the MIT License.