Skip to content

Commit ec79233

Browse files
Junha Yangmergify[bot]
authored andcommitted
Wait nodes to sync each other
1 parent e438605 commit ec79233

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

integration-test/tests/multi.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,15 @@ async fn track_blocks() {
8585
delay_for(Duration::from_secs(1)).await;
8686
}
8787

88-
for i in 0..4 {
89-
assert!(get_latest_block(GRAPHQL_PORT_BASE + i).await >= start_block + 8)
88+
for _ in 0..60 {
89+
delay_for(Duration::from_secs(1)).await;
90+
let mut success = true;
91+
for i in 0..4 {
92+
success = success && get_latest_block(GRAPHQL_PORT_BASE + i).await >= start_block + 8;
93+
}
94+
if success {
95+
return
96+
}
9097
}
98+
panic!("Failed to sync 4 nodes")
9199
}

0 commit comments

Comments
 (0)