mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-08 07:17:39 +00:00
fix(pi): resume archived sessions safely (#1308)
* fix(pi): resume archived sessions safely * fix(pi): harden native resume startup * fix(pi): harden resume termination evidence * fix(runner): persist resume process evidence * fix(runner): track resume process generations * fix(runner): verify full session tree shutdown * fix(pi): block pre-mapping resume dedup
This commit is contained in:
@@ -159,7 +159,9 @@ describe.skipIf(!await isServerHealthy())('Runner Integration Tests', { timeout:
|
||||
|
||||
// Clean up - stop the spawned session
|
||||
expect(spawnedSession.happySessionId).toBeDefined();
|
||||
await stopRunnerSession(spawnedSession.happySessionId);
|
||||
expect(await stopRunnerSession(spawnedSession.happySessionId)).toBe('stopped');
|
||||
expect(await stopRunnerSession(spawnedSession.happySessionId)).toBe('already_gone');
|
||||
expect(await stopRunnerSession('unknown-session-id')).toBe('still_alive');
|
||||
});
|
||||
|
||||
it('stress test: spawn / stop', { timeout: 60_000 }, async () => {
|
||||
@@ -178,7 +180,7 @@ describe.skipIf(!await isServerHealthy())('Runner Integration Tests', { timeout:
|
||||
|
||||
// Stop all sessions
|
||||
const stopResults = await Promise.all(sessionIds.map(sessionId => stopRunnerSession(sessionId)));
|
||||
expect(stopResults.every(r => r), 'Not all sessions reported stopped').toBe(true);
|
||||
expect(stopResults.every(r => r === 'stopped' || r === 'already_gone'), 'Not all sessions reported stopped').toBe(true);
|
||||
|
||||
// Verify all sessions are stopped
|
||||
const emptySessions = await listRunnerSessions();
|
||||
|
||||
Reference in New Issue
Block a user