Skip to content

Commit

Permalink
Limit number of retries in shared_object_on_gateway test (MystenLabs#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lxfind authored Jun 21, 2022
1 parent 1f38582 commit e03a0af
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/sui/tests/shared_objects_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ async fn shared_object_on_gateway() {
// to only filter "timeout" errors, but the game way simply returns `anyhow::Error`, this
// will be fixed by issue #1717. Note that the gateway has an internal retry mechanism but
// it is not an infinite loop.
let mut retry = 10;
loop {
let futures: Vec<_> = gas_objects
.iter()
Expand All @@ -426,6 +427,10 @@ async fn shared_object_on_gateway() {
if replies.iter().all(|result| result.is_ok()) {
break;
}
if retry == 0 {
unreachable!("Failed after 10 retries. Latest replies: {:?}", replies);
}
retry -= 1;
}

let assert_value_transaction = move_transaction(
Expand Down

0 comments on commit e03a0af

Please sign in to comment.