Skip to content

Commit

Permalink
chore(ci): wait more for a floating IP
Browse files Browse the repository at this point in the history
  • Loading branch information
dtantsur committed Mar 16, 2024
1 parent 3f49408 commit d5398f4
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions tests/integration-create-delete-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,23 @@ async fn test_server_ops_with_port() {
"A floating IP"
);

tokio::time::sleep(time::Duration::from_secs(1)).await;

server.refresh().await.expect("Cannot refresh the server");

let server_ip = server.floating_ip().expect("No floating IP");
assert_eq!(server_ip, floating_ip.floating_ip_address());
for attempt in 0..10 {
tokio::time::sleep(time::Duration::from_secs(1)).await;

server.refresh().await.expect("Cannot refresh the server");

match server.floating_ip() {
Some(server_ip) => {
assert_eq!(server_ip, floating_ip.floating_ip_address());
break;
}
None => {
if attempt == 9 {
panic!("Still no floating IP after 10 seconds");
}
}
}
}

floating_ip
.dissociate()
Expand Down

0 comments on commit d5398f4

Please sign in to comment.