Skip to content

Commit

Permalink
Make more resilient
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles committed Dec 18, 2024
1 parent 01c48ce commit b58f8e2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions backend/integration_tests/src/client/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,19 @@ pub mod happy_path {

assert!(matches!(response, expand_onto_subnet::Response::Success));

for _ in 0..40 {
for i in 1..200 {
env.advance_time(Duration::from_secs(1));
env.tick();
}

let subnets::Response::Success(subnets) = super::subnets(env, sender, registry_canister_id, &Empty {});
if i % 10 == 0 {
let subnets::Response::Success(subnets) = super::subnets(env, sender, registry_canister_id, &Empty {});

if let Some(subnet) = subnets.into_iter().find(|s| s.subnet_id == subnet_id) {
return subnet;
}
}
}

subnets.last().unwrap().clone()
panic!("Failed to expand onto new subnet")
}
}

0 comments on commit b58f8e2

Please sign in to comment.