Commit 4bcb6fb
test: stabilize flaky restart test by waiting for fresh client
The "Worker crashed and client running - Restarting File (Refreshing
dependencies)" test reused the `untitled:Untitled-1` URI from the
preceding test. `initLean4Untitled` returned as soon as the InfoView
was open, before a fresh `LeanClient` for the new document was wired
up to the InfoProvider. When the server crashed, infoview RPCs hung
against the stale client instead of failing with `WorkerCrashed`, so
the "stopped processing" message never appeared and the assertion
timed out after 60s. Observed on both Windows and Linux.
`initLean4Untitled` now waits for the active client to reach the
running state before returning.
Also fixes two latent bugs in the test helpers:
- `clickInfoViewButton` missed a `return` on success, re-clicking the
target up to 5 times and toggling UI state.
- `findWord` never decremented `retries`, so a missing word hung until
the mocha suite timeout rather than failing with a clear assertion.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 988871a commit 4bcb6fb
1 file changed
+9
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
138 | 141 | | |
139 | 142 | | |
140 | 143 | | |
| |||
445 | 448 | | |
446 | 449 | | |
447 | 450 | | |
448 | | - | |
| 451 | + | |
449 | 452 | | |
450 | 453 | | |
451 | 454 | | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
| 455 | + | |
456 | 456 | | |
457 | 457 | | |
| 458 | + | |
| 459 | + | |
458 | 460 | | |
459 | 461 | | |
460 | | - | |
| 462 | + | |
461 | 463 | | |
462 | 464 | | |
463 | 465 | | |
| |||
541 | 543 | | |
542 | 544 | | |
543 | 545 | | |
| 546 | + | |
544 | 547 | | |
545 | 548 | | |
546 | 549 | | |
| |||
0 commit comments