Skip to content

Commit ba06d09

Browse files
authored
[consensus][buffer_manager_test][bugfix] count batches properly (aptos-labs#13839)
1 parent 0d92186 commit ba06d09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

consensus/src/pipeline/tests/buffer_manager_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,9 @@ async fn assert_results(
255255
batches: Vec<Vec<PipelinedBlock>>,
256256
result_rx: &mut Receiver<OrderedBlocks>,
257257
) {
258+
let total_batches = batches.iter().flatten().count();
258259
let mut blocks: Vec<PipelinedBlock> = Vec::new();
259-
for _ in 0..batches.len() {
260+
while blocks.len() < total_batches {
260261
let OrderedBlocks { ordered_blocks, .. } = result_rx.next().await.unwrap();
261262
blocks.extend(ordered_blocks.into_iter());
262263
}
@@ -340,7 +341,6 @@ fn buffer_manager_happy_path_test() {
340341
});
341342
}
342343

343-
#[ignore] // TODO: turn this test back on once the flakes have resolved.
344344
#[test]
345345
fn buffer_manager_sync_test() {
346346
// happy path

0 commit comments

Comments
 (0)