Commit 4a4f9ba
committed
test(lsp): give rename_test enough wall time for the LSP to compile the file
The rename_test exercised a real race: after `DidOpen` the LSP server
kicks off the parse/typecheck of the file in the background, and the
test only slept 100 ms before sending `textDocument/rename`. On any
slower CI runner (Windows, macos-15-intel) the database hadn't reached
`DBState::Ready` yet, so the request hit `handle_rename`, fell into
`try_get_db`, and the path either wasn't in the VFS or the analysis
db was still `Compiling`. The handler returned `Ok(None)`, the test
assertion failed with `left: Null` and the suite went red.
Bumping the wait to 1 s matches what the only other LSP test with a
real cold-start (the kpm download case) already uses (`wait_async!(2000)`).
Verified locally: rename_test now passes deterministically; pkg_mod_test
is an unrelated, pre-existing failure caused by a kcl.mod path typo
in test_data, not something this test exercises.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 42e4c11 commit 4a4f9ba
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1588 | 1588 | | |
1589 | 1589 | | |
1590 | 1590 | | |
1591 | | - | |
| 1591 | + | |
1592 | 1592 | | |
1593 | 1593 | | |
1594 | 1594 | | |
| |||
0 commit comments