mirror of
https://github.com/block/buzz.git
synced 2026-10-27 12:40:30 +00:00
test(read-state): pin the 25-thread cap in the summarize unit test
The pure summarize test still expected five rows, so counts 6 and 7 failed after the cap rose. It now checks counts around 25 and keeps literal boundaries rather than deriving them from the constant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Honey <8e307ae0076a4dab6b94b036ea3edc7e08f823a625269c1e6919e881a048b4d2@buzz.block.builderlab.xyz>
This commit is contained in:
@@ -399,9 +399,9 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn thread_rows_order_newest_first_break_ties_by_root_and_cap_at_five() {
|
fn thread_rows_order_newest_first_break_ties_by_root_and_cap_at_twenty_five() {
|
||||||
// Literal contract boundaries deliberately do not derive from the constant.
|
// Literal contract boundaries deliberately do not derive from the constant.
|
||||||
for count in [0_u8, 1, 4, 5, 6, 7] {
|
for count in [0_u8, 1, 24, 25, 26, 27] {
|
||||||
// Pairwise-equal times exercise the tie-break.
|
// Pairwise-equal times exercise the tie-break.
|
||||||
let threads = (0..count)
|
let threads = (0..count)
|
||||||
.map(|i| (vec![i; 32], replies(i64::from(i / 2))))
|
.map(|i| (vec![i; 32], replies(i64::from(i / 2))))
|
||||||
@@ -411,7 +411,7 @@ mod tests {
|
|||||||
expected.sort_by(|a, b| b.0.cmp(&a.0).then(a.1.cmp(&b.1)));
|
expected.sort_by(|a, b| b.0.cmp(&a.0).then(a.1.cmp(&b.1)));
|
||||||
let expected: Vec<_> = expected
|
let expected: Vec<_> = expected
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.take(5)
|
.take(25)
|
||||||
.map(|(_, i)| hex::encode([i; 32]))
|
.map(|(_, i)| hex::encode([i; 32]))
|
||||||
.collect();
|
.collect();
|
||||||
assert_eq!(roots, expected, "count {count}");
|
assert_eq!(roots, expected, "count {count}");
|
||||||
|
|||||||
Reference in New Issue
Block a user