Skip to content

Commit

Permalink
integration-tests: Increase the number of expected events (#1152)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
  • Loading branch information
lexnv authored Sep 5, 2023
1 parent 7c067aa commit c047d7f
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,10 @@ async fn transaction_unstable_submit_and_watch() {
async fn next_operation_event<T: serde::de::DeserializeOwned>(
sub: &mut RpcSubscription<FollowEvent<T>>,
) -> FollowEvent<T> {
// At most 5 retries.
for _ in 0..5 {
// Number of events to wait for the next operation event.
const NUM_EVENTS: usize = 10;

for _ in 0..NUM_EVENTS {
let event = sub.next().await.unwrap().unwrap();

match event {
Expand All @@ -309,5 +311,5 @@ async fn next_operation_event<T: serde::de::DeserializeOwned>(
return event;
}

panic!("Cannot find operation related event after 5 produced events");
panic!("Cannot find operation related event after {NUM_EVENTS} produced events");
}

0 comments on commit c047d7f

Please sign in to comment.