Repository navigation
Split r2-test's large listings into a faster test of their own - #8854
Conversation
r2-test took about 7 s in debug builds, and a slow machine pushed it past its 15 s timeout. Two thirds of that was largeListings, whose 300 puts and 300 deletes each cost a round trip through r2.js and the bucket service. Its two listings now use fewer objects with metadata near the 8 KiB limit: 70 objects still pass the 512 KiB reply budget, and 50 wide objects with their prefixes still end a page at a prefix. The second listing now asserts it takes more than one page. Before, the "bytes, not characters" case relied on a single page of over 1 MiB being refused by the binding, which these sizes no longer reach. The listings move to r2-listing-test, so they run alongside the rest of r2-test. In debug builds each test now takes about 2.5-3 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8854 +/- ##
==========================================
- Coverage 67.84% 67.76% -0.09%
==========================================
Files 848 848
Lines 215237 216079 +842
Branches 32495 32540 +45
==========================================
+ Hits 146032 146430 +398
- Misses 50004 50437 +433
- Partials 19201 19212 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
✅ Approved — A test-only change that splits the large listings into their own target; the smaller sizes still exceed the 512 KiB reply budget, and the bytes-versus-characters check now asserts more than one page. No issues found.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
Test-only change. The new config uses a local-disk bucket under TEST_TMPDIR, the same as the existing r2-test config.
📖 AGENTS.md: ✅ LGTM
No issues found.
📋 Code Quality: ✅ LGTM
The new test keeps the old assertions and adds an explicit check that the listing takes more than one page. Its sizes still exceed the 512 KiB budget: about 560 KB in the first listing, and about 646 KB in bytes but about 246K in characters in the second.
⚡ Performance: ✅ LGTM
No issues found.
📝 Documentation: ✅ LGTM
No issues found.
Reviewed commit: 6242a5c0
r2-test took about 7 s in debug builds, and a slow machine pushed it past its 15 s timeout. Two thirds of that was
largeListings: its 300 puts and 300 deletes each make a round trip throughr2.jsand the bucket service, about 7 ms apiece in a debug build.r2-listing-test, so they run in parallel with the rest of r2-test.Debug build, 50 runs of each variant on the same remote executors:
ASan, 50 runs each: r2-test went from a p50 of 3.3 s to 1.3–1.6 s, and r2-listing-test runs at 1.6–1.8 s. All 300 runs passed.
🤖 Generated with Claude Code