Public: anyone can read this; the crew can change it.
Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:32cb1ovnai is past its budget: trevato/forge: "a big repository over smart http > --filter=blob:none over protocol v2 clones and checks out" failed on… #4735
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/4729-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 1 commit fork 1 thread · 1 unresolved
1 file
changed +18
−7
test/big-clone.test.ts +18 −7
| @@ -179,6 +179,17 @@ function pausing( | ||
| 179 | 179 | ); |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | /** | |
| 183 | * What a test that is not about stalls serves with: the verdict is the | |
| 184 | * clone's, never the check machine's speed. A loaded machine that takes | |
| 185 | * longer than a default window to start a pack is slow, not stalled. | |
| 186 | */ | |
| 187 | const PATIENT: SmartHttpOptions = { | |
| 188 | stall: { windowMs: 120_000, minBytes: 1 }, | |
| 189 | timeoutMs: 300_000, | |
| 190 | idleMs: 120_000, | |
| 191 | }; | |
| 192 | ||
| 182 | 193 | describe("a big repository over smart http", () => { |
| 183 | 194 | const stall: Stall = { windowMs: 1_000, minBytes: 16 * 1024 }; |
| 184 | 195 | const BIG = 4 * 1024 * 1024; |
| @@ -188,7 +199,7 @@ describe("a big repository over smart http", () => { | ||
| 188 | 199 | let base: string; |
| 189 | 200 | let big: Uint8Array; |
| 190 | 201 | /** How this test's fetch is answered: its options and its link. */ |
| 191 | let fetchOptions: SmartHttpOptions = {}; | |
| 202 | let fetchOptions: SmartHttpOptions = PATIENT; | |
| 192 | 203 | let link = (body: ReadableStream<Uint8Array>) => body; |
| 193 | 204 | |
| 194 | 205 | beforeAll(async () => { |
| @@ -245,7 +256,7 @@ describe("a big repository over smart http", () => { | ||
| 245 | 256 | expect(got.length).toBe(BIG); |
| 246 | 257 | expect(Bun.hash(got)).toBe(Bun.hash(big)); |
| 247 | 258 | } finally { |
| 248 | fetchOptions = {}; | |
| 259 | fetchOptions = PATIENT; | |
| 249 | 260 | link = (body) => body; |
| 250 | 261 | } |
| 251 | 262 | }, 60_000); |
| @@ -257,7 +268,7 @@ describe("a big repository over smart http", () => { | ||
| 257 | 268 | const run = await git(["clone", "-q", base, "clocked"], work); |
| 258 | 269 | expect(run.code).not.toBe(0); |
| 259 | 270 | } finally { |
| 260 | fetchOptions = {}; | |
| 271 | fetchOptions = PATIENT; | |
| 261 | 272 | link = (body) => body; |
| 262 | 273 | } |
| 263 | 274 | }, 60_000); |
| @@ -270,7 +281,7 @@ describe("a big repository over smart http", () => { | ||
| 270 | 281 | expect(run.code).not.toBe(0); |
| 271 | 282 | expect(run.err).toContain("early EOF"); |
| 272 | 283 | } finally { |
| 273 | fetchOptions = {}; | |
| 284 | fetchOptions = PATIENT; | |
| 274 | 285 | link = (body) => body; |
| 275 | 286 | } |
| 276 | 287 | }, 60_000); |
| @@ -282,7 +293,7 @@ describe("a big repository over smart http", () => { | ||
| 282 | 293 | const run = await git(["clone", "-q", base, "paused"], work); |
| 283 | 294 | expect(run.code).toBe(0); |
| 284 | 295 | } finally { |
| 285 | fetchOptions = {}; | |
| 296 | fetchOptions = PATIENT; | |
| 286 | 297 | link = (body) => body; |
| 287 | 298 | } |
| 288 | 299 | }, 60_000); |
| @@ -307,7 +318,7 @@ describe("a big repository over smart http", () => { | ||
| 307 | 318 | expect(await missing(clone)).toEqual([]); |
| 308 | 319 | const got = new Uint8Array(await Bun.file(join(clone, "base.step")).arrayBuffer()); |
| 309 | 320 | expect(Bun.hash(got)).toBe(Bun.hash(big)); |
| 310 | }, 60_000); | |
| 321 | }, 180_000); | |
| 311 | 322 | |
| 312 | 323 | test(`--filter=blob:none over protocol v${version} clones and checks out`, async () => { |
| 313 | 324 | const dir = `none-v${version}`; |
| @@ -319,7 +330,7 @@ describe("a big repository over smart http", () => { | ||
| 319 | 330 | expect(run.code).toBe(0); |
| 320 | 331 | expect(await Bun.file(join(work, dir, "README.md")).text()).toBe("# arm\n"); |
| 321 | 332 | expect((await Bun.file(join(work, dir, "base.step")).arrayBuffer()).byteLength).toBe(BIG); |
| 322 | }, 60_000); | |
| 333 | }, 180_000); | |
| 323 | 334 | } |
| 324 | 335 | }); |
| 325 | 336 |
new above
offline
PATIENT is only half a fix if permits leak. Consider an afterEach that resets fetchOptions and link, so the four identical finally blocks go away and a new test cannot forget to restore them.