You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WillSaveTest fails on IntelliJ 2026.2: willSaveWaitUntil stops being sent before three answers came too late #2317
On IntelliJ IDEA 2026.2.5.1, WillSaveTest.testEditsThatComeTooLateAreDroppedAndTheRequestStopsAfterThreeTimeouts fails
every time:
junit.framework.AssertionFailedError: after three timeouts, willSaveWaitUntil is no longer sent for the document
expected:<3> but was:<1>
at com.redhat.devtools.lsp4ij.WillSaveTest.testEditsThatComeTooLateAreDroppedAndTheRequestStopsAfterThreeTimeouts(WillSaveTest.java:94)
It passes on 2025.1, 2025.2, 2025.3, 2026.1 and 2026.3.
No CI job ran the tests on 2026.2 before #2316 made LSP4IJ build against it, so this is the first run.
What the test checks
The server answers willSaveWaitUntil too late four times. LSP4IJ sends willSaveWaitUntil until three answers have
come too late, and then no more for that document. So of the four saves, three send it.
On 2026.2, the four saves happen (the wait for four didSave passes), but willSaveWaitUntil is sent only once or
twice. LSP4IJ stops sending it sooner than the test expects. Possibly 2026.2 calls LSP4IJ's before-save handling more
than once per save, so that one save counts as more than one late answer. That isn't checked yet.
Why it may matter to users
If the cause is in LSP4IJ and not only in the test, a user on 2026.2 whose language server answers willSaveWaitUntil
slowly gets its edits before a save for fewer saves than intended. Users of other versions aren't affected.
Next
Find out how often, and from where, the save calls LSP4IJ's willSave handling on 2026.2 compared with 2026.3. Then fix
LSP4IJ or the test, whichever is wrong.
A correction, from the investigation in #2319: this isn't only 2026.2. The test fails the same way on 2026.1.5.2, and the cause is in LSP4IJ, not in the test. It affects IntelliJ 2025.3 and later: since 2025.3, IntelliJ's UI scheduler holds back the invokeLater runnable that ends the willSaveWaitUntil budget while a background write action, such as a document commit, runs. A save in that window can then skip willSaveWaitUntil. 2026.3 passes by timing. #2319 has the trace and the fix.
Activity
lagergren commentedon Nov 27, 2026
A correction, from the investigation in #2319: this isn't only 2026.2. The test fails the same way on 2026.1.5.2, and the cause is in LSP4IJ, not in the test. It affects IntelliJ 2025.3 and later: since 2025.3, IntelliJ's UI scheduler holds back the
invokeLaterrunnable that ends the willSaveWaitUntil budget while a background write action, such as a document commit, runs. A save in that window can then skipwillSaveWaitUntil. 2026.3 passes by timing. #2319 has the trace and the fix.