test(windows): preserve E2B cleanup coverage
This commit is contained in:
@@ -910,6 +910,21 @@ describe('E2B subprocess terminal service', () => {
|
||||
})
|
||||
|
||||
it('contains a failed automatic terminal release until service disposal retries it', async () => {
|
||||
const { fiber, fake } = await service()
|
||||
fake.clearOnTerm = false
|
||||
fake.clearOnKill = false
|
||||
const terminal = await (fiber.ctx).subprocess.spawnTerminal(spec({ graceMs: 1 }))
|
||||
fake.handle.succeed(0)
|
||||
await terminal.done
|
||||
await new Promise(resolve => setTimeout(resolve, 10))
|
||||
expect(fake.commands).toContain('kill -KILL -- -123')
|
||||
|
||||
fake.groups = []
|
||||
await fiber.dispose()
|
||||
await expect(terminal.terminate()).resolves.toBeUndefined()
|
||||
})
|
||||
|
||||
it('contains an immediate automatic terminal release rejection before disposal retries it', async () => {
|
||||
const { fiber, fake } = await service()
|
||||
fake.groups = []
|
||||
const terminal = await (fiber.ctx).subprocess.spawnTerminal(spec())
|
||||
|
||||
Reference in New Issue
Block a user