Skip to content

Commit 62010e1

Browse files
committed
test(gateway): await setup admission owner settlement
1 parent 5969874 commit 62010e1

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎src/gateway/server-methods/setup-admission.test.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,21 +102,22 @@ describe("setup admission", () => {
102102
const continueAfterStart = createDeferred();
103103
let runner: Promise<void> | undefined;
104104

105-
await runWithGatewayIndependentRootWorkAdmission(async () => {
106-
await createAdmittedWizardSession(() => {
105+
const session = await runWithGatewayIndependentRootWorkAdmission(async () =>
106+
createAdmittedWizardSession(() => {
107107
runner = (async () => {
108108
await continueAfterStart.promise;
109109
await enqueueCommandInLane("setup-post-start-proof", async () => undefined);
110110
})();
111111
return { whenSettled: () => runner! };
112-
});
113-
});
112+
}),
113+
);
114114

115115
const activeAfterStart = getActiveGatewayRootWorkCount();
116116
continueAfterStart.resolve();
117117
await expect(runner).resolves.toBeUndefined();
118118
expect(activeAfterStart).toBe(1);
119-
await vi.waitFor(() => expect(getActiveGatewayRootWorkCount()).toBe(0));
119+
await whenAdmittedWizardSessionSettled(session!);
120+
expect(getActiveGatewayRootWorkCount()).toBe(0);
120121
});
121122

122123
it("releases an admitted session lease when construction fails", async () => {

0 commit comments

Comments
 (0)