Public: anyone can read this; the crew can change it.
Full suite red: test/home-200.test.ts #12822
Check · Review · Land · Live done — Landed and live in production.
mason/forge:mason/12791-full-suite-red-test-home-200-test-ts → main 1 commit fork
1 file
changed +7
−4
bench/snappy.ts +7 −4
| @@ -78,15 +78,15 @@ export async function snappyFixture( | ||
| 78 | 78 | const app = createApp({ dataDir, port: 0 }); |
| 79 | 79 | const owner = await person(app, "olive", true); |
| 80 | 80 | const peer = await person(app, "pablo", false); |
| 81 | const repos: Repo[] = []; | |
| 82 | for (let r = 0; r < plan.repos; r++) { | |
| 81 | const repos: Repo[] = new Array(plan.repos); | |
| 82 | const build = async (r: number): Promise<void> => { | |
| 83 | 83 | const made = await createRepo(app, owner, { |
| 84 | 84 | name: `app-${r}`, |
| 85 | 85 | visibility: r % 3 === 0 ? "public" : "private", |
| 86 | 86 | }); |
| 87 | 87 | if (!made.ok) throw new Error(String(made.error)); |
| 88 | 88 | const repo = made.value; |
| 89 | repos.push(repo); | |
| 89 | repos[r] = repo; | |
| 90 | 90 | const issues: Issue[] = []; |
| 91 | 91 | for (let i = 0; i < plan.issuesPerRepo; i++) { |
| 92 | 92 | const opened = openIssue(app, owner, repo, { |
| @@ -109,7 +109,10 @@ export async function snappyFixture( | ||
| 109 | 109 | }); |
| 110 | 110 | if (!on.ok) throw new Error(String(on.error)); |
| 111 | 111 | } |
| 112 | } | |
| 112 | }; | |
| 113 | // Repositories are made a batch at a time: each waits on `git init`, and the batch overlaps those waits. | |
| 114 | for (let r = 0; r < plan.repos; r += 10) | |
| 115 | await Promise.all(Array.from({ length: Math.min(10, plan.repos - r) }, (_, k) => build(r + k))); | |
| 113 | 116 | const mine = await createRepo(app, peer, { name: "notes", visibility: "private" }); |
| 114 | 117 | if (!mine.ok) throw new Error(String(mine.error)); |
| 115 | 118 | openIssue(app, peer, mine.value, { title: "Peer's own private plan" }); |
new above
offline