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
test: ResolvedCodeActionTest.testUndoRevertsTheResolvedEditAlone failed once on IntelliJ 2026.1.5.2: the resolved edit wasn't applied #2315
ResolvedCodeActionTest.testUndoRevertsTheResolvedEditAlone failed once, in the nightly's new job for IntelliJ IDEA
2026.1.5.2 (job, on a fork, on the
branch of #2042, which doesn't change this test or the code it runs):
com.redhat.devtools.lsp4ij.features.codeAction.ResolvedCodeActionTest testUndoRevertsTheResolvedEditAlone FAILED
junit.framework.ComparisonFailure: expected:<[hello ]world!> but was:<[]world!>
at com.redhat.devtools.lsp4ij.features.codeAction.ResolvedCodeActionTest.testUndoRevertsTheResolvedEditAlone(ResolvedCodeActionTest.java:56)
Line 56 is the first assertion. After the intention ran and the events were dispatched, the resolved edit (hello )
wasn't in the document.
It hasn't been reproduced:
The class passed 3 times out of 3 locally, headless, on 2026.1.5.2.
It isn't among the failures of the last 40 failed runs of ci.yml, nor of the nightly.
What's known
The reply isn't late. In test mode, LSPLazyCodeActionIntentionAction.invoke resolves the code action
synchronously (resolveCodeAction(…).get(10 s)). It then applies it with invokeLater(applyResolved), which the
test's PlatformTestUtil.dispatchAllEventsInIdeEventQueue() should run.
Only two checks can refuse the edit. The edit has no document version (WorkspaceEdit.changes). So WorkspaceEditSnapshot.validate only checks:
that the document's synchronizer, modification sequence and stamp, captured in invoke, still match;
that the connection is the same.
If either check fails, it shows an error hint and doesn't apply the edit. That gives exactly world!.
Not known yet: what could change between invoke and applyResolved in this test, or whether the invokeLater
ran at all.
Next
Make a failing run say why:
record whether applyResolved ran and the reason it refused the edit, and assert it with a message;
wait with a bound for the edit, instead of after one event dispatch.
A rerun of the failing case on CI would then show which check refused it.
Activity
test: ResolvedCodeActionTest waits until the resolved edit has been a…