Repository navigation
Description
WebFilterQuickFixTest.testWebFilterQuickFix intermittently fails in CI. This issue tracks stabilizing the test and restoring any temporarily disabled platform coverage.
The latest failure is on macOS in #1696, at 9960b789:
https://github.com/redhat-developer/lsp4ij/actions/runs/38578151701/job/115901976918
java.lang.AssertionError: Add the `servletNames` attribute to @WebFilter
expected:<[Add the `urlPatterns` attribute to @WebFilter]> but was:<[]>
at WebFilterQuickFixTest.testWebFilterQuickFix(WebFilterQuickFixTest.java:29)
Linux and Windows passed in that run. The earlier revision of the same PR passed on all three platforms: https://github.com/redhat-developer/lsp4ij/actions/runs/38575391481
The same test also failed on main before this PR:
- August 19,
69914bdb, macOS:junit.framework.AssertionFailedErrorat line 29. https://github.com/redhat-developer/lsp4ij/actions/runs/32252014671/job/96064967540 - September 4,
2a5d0420, macOS and Linux:Unable to highlight after 1000 retries, caused byProcessCanceledException. https://github.com/redhat-developer/lsp4ij/actions/runs/33872878328/job/101022809783 and https://github.com/redhat-developer/lsp4ij/actions/runs/33872878328/job/101022810193
These are different failure signatures in the same test; I have not established whether they share a root cause. The historical Linux failure also means the instability is not necessarily macOS-specific.
I ran the test against unmodified current main (f3825955) locally on macOS with JDK 21, and it passed with no skips. I do not have a deterministic reproducer. The targeted command is:
NO_FS_ROOTS_ACCESS_CHECK=true ./gradlew test \
--tests com.redhat.devtools.lsp4ij.features.codeAction.WebFilterQuickFixTest \
--rerun-tasks --no-build-cacheThe CI workflow runs ./gradlew check. This test uses the mock language-server connection, rather than the OS process provider changed in #1696.
The temporary macOS-only skip proposed in #1696 has been removed to keep that PR focused on the process-lifetime fix. This test remains enabled on all platforms. A fresh targeted local run on macOS passed after restoring it, but the intermittent CI failure remains unresolved and is tracked here separately.
Potentially related: #294 reports intermittently missing quick fixes in MicroProfile/Jakarta integration. I did not find an issue specifically tracking this CI test failure, and have not confirmed a shared cause with #294.
Activity
test: temporarily skip flaky WebFilter quick fix on macOS
test: restore WebFilter quick fix coverage on macOS
test: temporarily skip flaky WebFilter quick fix on macOS
test: restore WebFilter quick fix coverage on macOS
lagergren commentedon Oct 19, 2026
An update on this flake. I don't have a fix yet, but I do have a deterministic reproduction of one of its signatures, plus a lead and a dead end.
Recent failures
It is the most frequent test failure in CI right now. It failed in 9 runs between 2026-10-16 and 2026-10-19, on several branches, with all three signatures from the description:
feat/diagnostic-update-hookUnable to highlight after 1000 retriesfeat/workspace-diagnosticsUnable to highlight after 1000 retriesfeat/diagnostic-update-hookAssertionFailedErrorfeat/workspace-diagnosticsUnable to highlight after 1000 retriesfeat/workspace-diagnosticsAssertionFailedErrorfeat/workspace-diagnosticsexpected:<[Add the `urlPatterns` attribute to @WebFilter]> but was:<[]>fix/format-without-editorAssertionFailedErrormainAssertionFailedErrorfix/inline-completion-contextUnable to highlight after 1000 retriesReproduction of the
AssertionFailedErrorThe mock server publishes diagnostics from its
didOpenhandler. Delaying that by one second makes the test fail every time with theAssertionFailedErrorsignature, inLSPCodeActionFixtureTestCase.assertCodeActions'sassertNotEmpty(actions), called fromWebFilterQuickFixTest.java:29. The delay goes inMockTextDocumentService.didOpen:So the test depends on when the diagnostics arrive relative to
myFixture.doHighlighting()ingetAllQuickFixes(). Nothing in the fixture waits for them.What did not work
I made the fixture wait before highlighting until the file's
OpenedDocumentheld the diagnostics, then calledNonBlockingReadActionImpl.waitForAsyncTaskCompletion()so thatLSPDiagnosticsAppliercould set its highlighters. That fails even without the delay. Right beforedoHighlighting()the editor's markup had no highlights, anddoHighlighting()returned no infos.In editor mode,
LSPDiagnosticsPassFactory.createHighlightingPassreturnsnull; the diagnostics are applied reactively byLSPDiagnosticsApplier. So my guess is that the passing runs depend on the diagnostics, and their application, landing whiledoHighlighting()runs, and that waiting first loses them. I haven't confirmed that. Thebut was:<[]>signature, where quick fixes exist but none is available, and theUnable to highlight after 1000 retriessignature are not reproduced.fix: send a cancelled quick-fix code action request again
fix: send one code action request when parallel highlighting passes ask
lagergren commentedon Oct 19, 2026
Found and fixed in #1717, which closes this issue when it merges.
Unable to highlight after 1000 retries, andbut was:<[]>: a race inLSPLazyCodeActions. Highlighting passes run in parallel, and two of them could load the same quick fixes at once. The second load cancelled the first request before it was sent. If that cancelled request stayed stored, every later use either rethrewProcessCanceledExceptionfromShowIntentionsPassor reported "no code action" for good.AssertionFailedErrorwith no quick fixes: a race inLSPCodeActionFixtureTestCase. It highlighted only once, so it depended on the diagnostics arriving during that single highlighting.With the test repeated 150 times in one JVM, unchanged
mainfailed twice and had 8 double loads. With #1717 there were no failures and no double loads. #1719 tracks two related problems that #1717 leaves as they are.fix: send a cancelled quick-fix code action request again
fix: send one code action request when parallel highlighting passes ask