Skip to content

Commit 644b33f

Browse files
committed
test(daemon): shut the skipped-provider startup runtime down in finally
1 parent a2a5859 commit 644b33f

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎src/daemon/server/daemon-runtime-metadata-ownership.test.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,12 @@ test('a skipped provider runtime is logged after this daemon publishes its recor
178178
});
179179
providerComposition.skipped = [{ provider: 'limrun', error }];
180180
const runtime = await startRuntime(stateDir, () => {});
181-
const skipped = logEvents(stateDir).find(({ phase }) => phase === 'provider_runtime_skipped');
182-
expect(skipped?.data).toMatchObject({ provider: 'limrun', code: 'INVALID_ARGS' });
183-
await runtime?.shutdown();
181+
try {
182+
const skipped = logEvents(stateDir).find(({ phase }) => phase === 'provider_runtime_skipped');
183+
expect(skipped?.data).toMatchObject({ provider: 'limrun', code: 'INVALID_ARGS' });
184+
} finally {
185+
await runtime?.shutdown();
186+
}
184187
});
185188

186189
test('a startup that fails before publication removes no record and writes no log', async () => {

0 commit comments

Comments
 (0)