We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
test_peer_info
1 parent dc98ec6 commit 05d811dCopy full SHA for 05d811d
tests/tests/node_info.rs
@@ -92,8 +92,18 @@ async fn test_peer_info() {
92
// This is just a mock of what we should be able to do with GQL API.
93
let client = producer.node.bound_address;
94
let client = FuelClient::from(client);
95
- let peers = client.connected_peers_info().await.unwrap();
96
- assert_eq!(peers.len(), 2);
+ let mut peers;
+
97
+ // It takes some time before all validators are connected.
98
+ loop {
99
+ peers = client.connected_peers_info().await.unwrap();
100
101
+ if peers.len() == 2 {
102
+ break;
103
+ }
104
+ tokio::time::sleep(Duration::from_secs(1)).await;
105
106
107
let info = peers
108
.iter()
109
.find(|info| info.id.to_string() == validator_peer_id.to_base58())
0 commit comments