Skip to content

Commit

Permalink
[smoke-test][qs] add generate_traffic timeout to bad node
Browse files Browse the repository at this point in the history
  • Loading branch information
ibalajiarun authored and JoshLind committed Jul 19, 2024
1 parent 9a58d3a commit 6162c35
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions testsuite/smoke-test/src/consensus/quorum_store_fault_tolerance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,21 +370,24 @@ async fn test_swarm_with_bad_non_qs_node() {
.unwrap();

info!("generate traffic");
let tx_stat = generate_traffic(
&mut swarm,
&[dishonest_peer_id],
Duration::from_secs(20),
1,
vec![vec![
(TransactionTypeArg::CoinTransfer.materialize_default(), 70),
(
TransactionTypeArg::AccountGeneration.materialize_default(),
20,
),
]],
let tx_stat = tokio::time::timeout(
Duration::from_secs(60),
generate_traffic(
&mut swarm,
&[dishonest_peer_id],
Duration::from_secs(20),
1,
vec![vec![
(TransactionTypeArg::CoinTransfer.materialize_default(), 70),
(
TransactionTypeArg::AccountGeneration.materialize_default(),
20,
),
]],
),
)
.await;
assert!(tx_stat.is_err());
assert!(tx_stat.is_err() || tx_stat.is_ok_and(|result| result.is_err()));

generate_traffic_and_assert_committed(
&mut swarm,
Expand Down

0 comments on commit 6162c35

Please sign in to comment.