fix(runtime): close measured portability defects
This commit is contained in:
@@ -237,7 +237,7 @@ export class LocalPtySession implements PtyBackendSession {
|
||||
}
|
||||
this.activeDeadlineTimer = setTimeout(() => {
|
||||
if (this.active === operation) {
|
||||
this.settleActive('timeout', this.activeWrite?.operation === operation)
|
||||
this.settleActive('timeout', this.activeWrite?.operation === operation || this.interrupting === operation)
|
||||
}
|
||||
}, this.config.timeoutMs)
|
||||
void this.beginSend(operation, request)
|
||||
|
||||
@@ -365,11 +365,11 @@ describe('LocalPtySession readiness and output', () => {
|
||||
expect(operation.cancel()).toBe(true)
|
||||
|
||||
terminal.emitData('\x1b]133;D;130\x07dsh> ')
|
||||
await vi.advanceTimersByTimeAsync(10)
|
||||
await vi.advanceTimersByTimeAsync(100)
|
||||
expect((await operation.done).waitReason).toBe('timeout')
|
||||
expect(() => session.startSend({ text: 'successor', submit: true })).toThrow('active send')
|
||||
signalGate.resolve(undefined)
|
||||
await vi.advanceTimersByTimeAsync(10)
|
||||
await operation.done
|
||||
await vi.advanceTimersByTimeAsync(0)
|
||||
expect(inspector.groups).toContainEqual([456, 'SIGINT'])
|
||||
expect(inspector.groups).not.toContainEqual([789, 'SIGINT'])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user