mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 19:51:05 +00:00
integration-tests: Increase the number of expected events (#1152)
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -293,8 +293,10 @@ async fn transaction_unstable_submit_and_watch() {
|
|||||||
async fn next_operation_event<T: serde::de::DeserializeOwned>(
|
async fn next_operation_event<T: serde::de::DeserializeOwned>(
|
||||||
sub: &mut RpcSubscription<FollowEvent<T>>,
|
sub: &mut RpcSubscription<FollowEvent<T>>,
|
||||||
) -> FollowEvent<T> {
|
) -> FollowEvent<T> {
|
||||||
// At most 5 retries.
|
// Number of events to wait for the next operation event.
|
||||||
for _ in 0..5 {
|
const NUM_EVENTS: usize = 10;
|
||||||
|
|
||||||
|
for _ in 0..NUM_EVENTS {
|
||||||
let event = sub.next().await.unwrap().unwrap();
|
let event = sub.next().await.unwrap().unwrap();
|
||||||
|
|
||||||
match event {
|
match event {
|
||||||
@@ -309,5 +311,5 @@ async fn next_operation_event<T: serde::de::DeserializeOwned>(
|
|||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
panic!("Cannot find operation related event after 5 produced events");
|
panic!("Cannot find operation related event after {NUM_EVENTS} produced events");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user