Fix flaky broadcast test (#14329)
This commit is contained in:
@ -666,8 +666,6 @@ pub mod test {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sleep(Duration::from_millis(2000));
|
|
||||||
|
|
||||||
trace!(
|
trace!(
|
||||||
"[broadcast_ledger] max_tick_height: {}, start_tick_height: {}, ticks_per_slot: {}",
|
"[broadcast_ledger] max_tick_height: {}, start_tick_height: {}, ticks_per_slot: {}",
|
||||||
max_tick_height,
|
max_tick_height,
|
||||||
@ -675,10 +673,17 @@ pub mod test {
|
|||||||
ticks_per_slot,
|
ticks_per_slot,
|
||||||
);
|
);
|
||||||
|
|
||||||
let blockstore = broadcast_service.blockstore;
|
let mut entries = vec![];
|
||||||
let entries = blockstore
|
for _ in 0..10 {
|
||||||
|
entries = broadcast_service
|
||||||
|
.blockstore
|
||||||
.get_slot_entries(slot, 0)
|
.get_slot_entries(slot, 0)
|
||||||
.expect("Expect entries to be present");
|
.expect("Expect entries to be present");
|
||||||
|
if entries.len() >= max_tick_height as usize {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
sleep(Duration::from_millis(1000));
|
||||||
|
}
|
||||||
assert_eq!(entries.len(), max_tick_height as usize);
|
assert_eq!(entries.len(), max_tick_height as usize);
|
||||||
|
|
||||||
drop(entry_sender);
|
drop(entry_sender);
|
||||||
|
Reference in New Issue
Block a user