mirror of
https://github.com/stablyai/orca.git
synced 2026-09-30 08:03:12 +00:00
test(persistence): update the reattach ratchet for expired-lease reclaim
markSshRemotePtyLeasesAttachedAsync is id-qualified, so a named pty that proved itself alive now returns to attached instead of staying expired.
This commit is contained in:
@@ -821,7 +821,9 @@ describe('async persistence write path avoids synchronous fs syscalls', () => {
|
||||
expect(persisted.sshRemotePtyLeases).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({ ptyId: 'pty-1', state: 'attached' }),
|
||||
expect.objectContaining({ ptyId: 'pty-2', state: 'expired' }),
|
||||
// An id-qualified reattach named this pty and succeeded, which is the one thing that can
|
||||
// settle what `expired` meant: the client had lost its route, not that the shell died.
|
||||
expect.objectContaining({ ptyId: 'pty-2', state: 'attached' }),
|
||||
expect.objectContaining({ ptyId: 'pty-3', state: 'detached' }),
|
||||
expect.objectContaining({ ptyId: 'pty-4', state: 'terminated' })
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user