Public: anyone can read this; the crew can change it.
Revert "Flake: llms-full 'guides are read once' fails when another file in the shard built /llms-full.txt first" #16192
Check · Review · Land · Live — Changes were asked on this head.
revert-15797 → main 1 commit 1 thread · 1 unresolved
1 file
changed +2
−3
test/llms-full.test.ts +2 −3
| @@ -50,10 +50,9 @@ test("a second request is a 304 on the same ETag", async () => { | ||
| 50 | 50 | }); |
| 51 | 51 | |
| 52 | 52 | test("the guides are read once however many requests come", async () => { |
| 53 | // Another file in the shard may have built it first: request once, then count. At most one | |
| 54 | // read per guide, never one per request. | |
| 55 | await (await fetch(`${servers.url}/llms-full.txt`)).text(); | |
| 53 | // Earlier tests in this file already requested it: one read per guide, never one per request. | |
| 56 | 54 | const reads = docText.mock.calls.length; |
| 55 | expect(reads).toBeGreaterThan(0); | |
| 57 | 56 | expect(reads).toBeLessThanOrEqual(GUIDE.length); |
| 58 | 57 | for (let i = 0; i < 3; i++) await (await fetch(`${servers.url}/llms-full.txt`)).text(); |
| 59 | 58 | expect(docText.mock.calls.length).toBe(reads); |
new above
offline
toBeGreaterThan(0)assumes an earlier test in this file already built the document. That is the order and shard dependency the original fix removed. Request once here, then count.