Public: anyone can read this; the crew can change it.
Flaky: test/search.test.ts #2131
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/2105-flaky-test-search-test-ts → main 3 commits fork
2 files
changed +13
−7
scripts/gate.ts −5
| @@ -72,11 +72,6 @@ export const EXCLUDED: readonly Exclusion[] = [ | ||
| 72 | 72 | }, |
| 73 | 73 | { file: "test/runs-lease.test.ts", reason: "not yet admitted", issue: 261 }, |
| 74 | 74 | { file: "test/scaffold.test.ts", reason: "not yet admitted", issue: 261 }, |
| 75 | { | |
| 76 | file: "test/search.test.ts", | |
| 77 | reason: "red in random order: local repo hits carry their open counts", | |
| 78 | issue: 2105, | |
| 79 | }, | |
| 80 | 75 | { |
| 81 | 76 | file: "test/snapshot-destination.test.ts", |
| 82 | 77 | reason: "not yet admitted", |
test/search.test.ts +13 −2
| @@ -264,9 +264,20 @@ describe("search: one query, four sources", () => { | ||
| 264 | 264 | }); |
| 265 | 265 | |
| 266 | 266 | test("local repo hits carry their open counts", async () => { |
| 267 | const results = await find("q=widget-engine&kind=repos"); | |
| 267 | // Its own repo: other tests file issues in widget-engine, so counts | |
| 268 | // read there depend on which of them ran first. | |
| 269 | await api("/api/v1/repos", { | |
| 270 | method: "POST", | |
| 271 | body: JSON.stringify({ name: "tally-box", visibility: "public" }), | |
| 272 | }); | |
| 273 | for (const title of ["first tally", "second tally"]) | |
| 274 | await api("/api/v1/repos/alice/tally-box/issues", { | |
| 275 | method: "POST", | |
| 276 | body: JSON.stringify({ title, body: "" }), | |
| 277 | }); | |
| 278 | const results = await find("q=tally-box&kind=repos"); | |
| 268 | 279 | const hit = results.repos.find( |
| 269 | (r) => r.source === "local" && r.name === "widget-engine", | |
| 280 | (r) => r.source === "local" && r.name === "tally-box", | |
| 270 | 281 | ); |
| 271 | 282 | expect(hit).toMatchObject({ openIssues: 2, openPulls: 0 }); |
| 272 | 283 | }); |
new above
offline