Skip to content

Commit

Permalink
Merge pull request AleoNet#1676 from ljedrz/testnet3_patch_flaky_test
Browse files Browse the repository at this point in the history
Add a short sleep to a flaky test
  • Loading branch information
ljedrz authored Mar 10, 2022
2 parents 47e2b92 + 64aeb36 commit 0616eb0
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .integration/tests/network/basic_connectivity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ use crate::common::spawn_test_node_with_nonce;
use snarkos_integration::{wait_until, ClientNode, TestNode, MAXIMUM_NUMBER_OF_PEERS};

use pea2pea::Pea2Pea;
use std::sync::{
atomic::{AtomicU8, Ordering::*},
Arc,
use std::{
sync::{
atomic::{AtomicU8, Ordering::*},
Arc,
},
time::Duration,
};
use tokio::task;
use tokio::{task, time};

#[tokio::test]
async fn client_nodes_can_connect_to_each_other() {
Expand Down Expand Up @@ -160,6 +163,9 @@ async fn connection_limits_are_obeyed() {
test_node.node().connect(client_node.local_addr()).await.unwrap();
}

// A short sleep to ensure all the connections are ready.
time::sleep(Duration::from_millis(10)).await;

// Create one additional test node.
let extra_test_node = TestNode::default().await;
let extra_test_node_addr = extra_test_node.node().listening_addr().unwrap();
Expand Down

0 comments on commit 0616eb0

Please sign in to comment.