Skip to content

Commit

Permalink
Write all blocks in transfer_snapshot_between_two_replicas at once
Browse files Browse the repository at this point in the history
To make the test go faster. Especially now with throttling RootNode
updates the test was running with the speed of one block per throttle
period (1s), which caused the test to time out.
  • Loading branch information
inetic committed Sep 7, 2023
1 parent 580eeb9 commit 8ba72ea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/src/network/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ async fn transfer_snapshot_between_two_replicas_case(
// TODO: Make it faster and increase the cases.
#[proptest(cases = 8)]
fn transfer_blocks_between_two_replicas(
#[strategy(1usize..32)] block_count: usize,
#[strategy(1usize..62)] block_count: usize,
#[strategy(test_utils::rng_seed_strategy())] rng_seed: u64,
) {
test_utils::run(transfer_blocks_between_two_replicas_case(
Expand Down Expand Up @@ -145,8 +145,10 @@ async fn transfer_blocks_between_two_replicas_case(block_count: usize, rng_seed:

a_vault.receive_block(block, Some(promise)).await.unwrap();
tracing::info!(?id, "write block");
}

// Then wait until replica B receives and writes it too.
// Then wait until replica B receives and writes it too.
for (id, _block) in snapshot.blocks() {
wait_until_block_exists(&b_vault, id).await;
}
};
Expand Down

0 comments on commit 8ba72ea

Please sign in to comment.