Drop stale JDT buffers when a test re-creates a compilation unit - #1640
Conversation
MenuComplexTest failed intermittently on Windows because the editor parsed the previous test's source instead of the file on disk. If JDT reads a compilation unit and the open is then cancelled, its buffer stays cached, and deleting and re-creating the file does not clear it. Opening and closing each newly created unit in the test setup discards such a leftover buffer. Assisted-by: multiple AI agents and layers of automated tooling 🤖
|
It never occurred to me to simply reopen the CU, in order to flush the stale cache. Though I wonder whether that's an issue with the test suite or a genuine bug on the JDT side... |
Test Results 4 files ±0 4 suites ±0 2h 9m 5s ⏱️ + 1m 55s For more details on these failures, see this check. Results for commit 40ee8ed. ± Comparison against base commit a799d4b. |
Possible. Unfortunately contribution to JDT is difficult. My currently open PRs are not getting any attention, so looking into JDT problems for me is on hold until I see movement in my existing PRs. |
|
The bane of every open-source project; A continuous lack of time and contributors to review all of the PRs. 😅The test failure seems unrelated, so things are looking good from my perspective. |
|
@vogella Thanks for looking into this! I've been scratching my head at those menu tests for quite a while. |
|
Thanks @ptziegler for the kind words and the fast merge. I continue to look into the stabilization of the tests, one of the most important foundations for a good contribution flow IMHO. |
MenuComplexTest failed intermittently on Windows CI because the design editor parsed the previous test's source instead of the file on disk. When JDT reads a compilation unit and the open is then cancelled, the buffer stays cached, and deleting and re-creating the file in the next test does not clear it. The test setup now opens and closes each newly created unit, which discards such a leftover buffer. The stale buffer was reproduced on Linux with a forced cancelled open, and MenuComplexTest and the full test suite pass locally, but the Windows flake itself could not be reproduced here, so CI will have to confirm it is gone.