test(terminal): wait for the newer worker to exit after a kill stop (#9290)
Cleanup counts a worker gone once its socket refuses connections, and the worker stops listening before its process exits. The test checked the worker pid right after closeTerminals() resolved, so it failed whenever the worker was still exiting. Wait for the pid to disappear, as the adjacent shutdown tests do.
This commit is contained in:
1 parent
2eba291a8e
commit
dd06bc0833
1 file changed
+3
-1
@@ -1690,8 +1690,10 @@ it("leaves a worker from a newer Paseo running, reports it incompatible, and clo
|
||||
|
||||
await manager.closeTerminals();
|
||||
|
||||
expect(isProcessAlive(newer.workerPid)).toBe(false);
|
||||
expect(isProcessAlive(newer.programPid)).toBe(false);
|
||||
// Cleanup counts the worker gone once its socket refuses connections, which happens before
|
||||
// its process exits.
|
||||
await waitForCondition(() => !isProcessAlive(newer.workerPid), 5000);
|
||||
expect(await workerRecords(paseoHome)).toEqual([]);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user