fix(test): hermetically exercise auth workflows
This commit is contained in:
@@ -46,9 +46,9 @@ function realChildBridge(
|
||||
bridge: factory({
|
||||
thtExecutable: pathStyle === "windows" ? "C:\\tht.exe" : launcher,
|
||||
spawnChild: (_executable, args, options) => spawn(launcher, [...args], options),
|
||||
// Leave enough startup headroom for a real child under a busy CI host while retaining a
|
||||
// sub-1.5-second bound from request start through final settlement.
|
||||
deadlinesForTest: { timeoutMs: 750, terminationGraceMs: 50, finalSettlementMs: 500 },
|
||||
// Keep this stricter than the five-second production timeout without assuming that a
|
||||
// real Node child can always start within 750 ms on a busy shared runner.
|
||||
deadlinesForTest: { timeoutMs: 2_000, terminationGraceMs: 50, finalSettlementMs: 500 },
|
||||
...(mode === "stdin" ? {
|
||||
beforeInputForTest: async () => {
|
||||
await waitForMarker(marker, "stdin-closed");
|
||||
@@ -585,6 +585,6 @@ describe("Windows auth-storage bridge", () => {
|
||||
|
||||
await expect(outcome).resolves.toMatchObject({ message: "auth_session_store_invalid" });
|
||||
await waitForMarker(marker, "terminated");
|
||||
expect(Date.now() - startedAt).toBeLessThan(1_500);
|
||||
expect(Date.now() - startedAt).toBeLessThan(3_000);
|
||||
}, 5_000);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user