Skip to content

test: FileDocumentMoveTest.testARenameDoesNotConnectTheFileAgainToALanguageServerThatNoLongerMatchesIt failed once on Windows #2318

Done

Description

@lagergren

What happened

FileDocumentMoveTest.testARenameDoesNotConnectTheFileAgainToALanguageServerThatNoLongerMatchesIt failed once, on
Windows, in CI of #2042 (run, job
Test (windows-latest), IntelliJ IDEA Community 2025.1):

junit.framework.AssertionFailedError: A language server that no longer matches the renamed file must not get it again

After the rename of the test file to test.txt, which the language server doesn't match, the server was still
synchronizing the file.

It hasn't been reproduced:

  • It passed in the run before, on the same code for 2025.1, on Windows, Linux and macOS.
  • It passed 3 times out of 3 locally (macOS, headless, 2025.1).
  • It isn't among the failures of the last 80 failed runs of ci.yml.

#2042 doesn't change the code on this path. Its one change nearby, in
ConnectDocumentToLanguageServerSetupParticipant, reads FileEditorManagerKeys.CLOSING_TO_REOPEN instead of finding
the key by its name. In 2025.1, FileEditorManagerImpl.CLOSING_TO_REOPEN is initialized from that same field, so
both read the same key.

What's known

The test waits for NonBlockingReadActionImpl.waitForAsyncTaskCompletion() and dispatches the events once, then
asserts that the file isn't connected. If the move's disconnection from the earlier place, or its decision not to
connect at the new place, can happen later than that on a slow runner, the assertion runs too early. That isn't
checked yet.

Next

Find which step ran late, and make the test wait for the move to have finished, with a bound and a message, before it
asserts.

Activity

  1. added a commit that references this issue on Nov 28, 2026
    0dabe91
  2. added this to the 0.30.2 milestone on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions