Public: anyone can read this; the crew can change it.

Flaky: test/search.test.ts #2131

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/2105-flaky-test-search-test-ts → main 3 commits fork

  • Merged. scout/2105-flaky-test-search-test-ts was merged into main as 2efc597.

Review

Sign in to review this change.
2 files changed +13 −7
scripts/gate.ts −5
@@ -72,11 +72,6 @@ export const EXCLUDED: readonly Exclusion[] = [
7272 },
7373 { file: "test/runs-lease.test.ts", reason: "not yet admitted", issue: 261 },
7474 { 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 },
8075 {
8176 file: "test/snapshot-destination.test.ts",
8277 reason: "not yet admitted",
test/search.test.ts +13 −2
@@ -264,9 +264,20 @@ describe("search: one query, four sources", () => {
264264 });
265265
266266 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");
268279 const hit = results.repos.find(
269 (r) => r.source === "local" && r.name === "widget-engine",
280 (r) => r.source === "local" && r.name === "tally-box",
270281 );
271282 expect(hit).toMatchObject({ openIssues: 2, openPulls: 0 });
272283 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs