Public: anyone can read this; the crew can change it.
Full suite red: test/apps-idle.test.ts #9556
mason/forge:mason/9473-full-suite-red-test-apps-idle-test-ts → main 2 commits fork 3 threads · 3 unresolved
1 file
changed +5
−5
test/apps-idle.test.ts +5 −5
| @@ -58,7 +58,7 @@ describe("previews of idle pulls sleep", () => { | ||
| 58 | 58 | const envOf = (n: number): EnvStatus | undefined => |
| 59 | 59 | runtime.status(record).find((e) => e.env === `pull-${n}`); |
| 60 | 60 | |
| 61 | async function until<T>(read: () => T | undefined, ms = 60_000): Promise<T> { | |
| 61 | async function until<T>(read: () => T | undefined, ms = 150_000): Promise<T> { | |
| 62 | 62 | const deadline = Date.now() + ms; |
| 63 | 63 | while (Date.now() < deadline) { |
| 64 | 64 | const value = read(); |
| @@ -126,7 +126,7 @@ describe("previews of idle pulls sleep", () => { | ||
| 126 | 126 | fresh = await pull("fresh"); |
| 127 | 127 | idle = await pull("idle"); |
| 128 | 128 | later = await pull("later"); |
| 129 | }, 120_000); | |
| 129 | }, 400_000); | |
| 130 | 130 | |
| 131 | 131 | afterAll(async () => { |
| 132 | 132 | await runtime.stop(); |
| @@ -188,7 +188,7 @@ describe("previews of idle pulls sleep", () => { | ||
| 188 | 188 | expect(reader).not.toContain("Wake it"); |
| 189 | 189 | const quiet = await (await fetch(`${servers.url}/alice/hello/pulls/${fresh}`)).text(); |
| 190 | 190 | expect(quiet).not.toContain("nobody pushed or commented since"); |
| 191 | }, 120_000); | |
| 191 | }, 400_000); | |
| 192 | 192 | |
| 193 | 193 | test("asking for a stopped preview redeploys it on the ordinary path", async () => { |
| 194 | 194 | // Invariant: a request for a dormant preview runs one "wake" deploy, and the woken preview counts as touched. |
| @@ -207,7 +207,7 @@ describe("previews of idle pulls sleep", () => { | ||
| 207 | 207 | // Woken, it counts as touched: the next sweep leaves it up. |
| 208 | 208 | await sweeps(2); |
| 209 | 209 | expect(envOf(idle)?.state).toBe("running"); |
| 210 | }, 120_000); | |
| 210 | }, 400_000); | |
| 211 | 211 | |
| 212 | 212 | test("a restart leaves a sleeping preview asleep", async () => { |
| 213 | 213 | // Invariant: a runtime booting over a dormant preview keeps it stopped and deploys nothing for it. |
| @@ -226,5 +226,5 @@ describe("previews of idle pulls sleep", () => { | ||
| 226 | 226 | (r) => r.env === `pull-${later}`, |
| 227 | 227 | ).length; |
| 228 | 228 | expect(after).toBe(before); |
| 229 | }, 120_000); | |
| 229 | }, 400_000); | |
| 230 | 230 | }); |
new above
offline