Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
e2e: Add limit to test_connection_crossing loop
✓ CI success Adrian Duke committed 15 days ago
commit f66f550c3dd35ac8b36887a9e369abdaa2d35476
parent 8f6f93fc870e938da4560436cc8cf91f3694f816
1 passed (1 total) View logs
1 file changed +5 -0
modified crates/radicle-node/src/tests/e2e.rs
@@ -906,6 +906,7 @@ fn test_connection_crossing() {
        assert_matches!(r2, ConnectResult::Connected);
    }

+
    let mut iterations = 0;
    let (alice_s, bob_s, s1, s2) = loop {
        let alice_s = alice.handle.sessions().unwrap();
        let bob_s = bob.handle.sessions().unwrap();
@@ -919,6 +920,10 @@ fn test_connection_crossing() {
                break (alice_s, bob_s, s1, s2);
            }
        }
+
        iterations += 1;
+
        if iterations >= 100 {
+
            panic!("Timeout waiting for sessions to connect");
+
        }
        thread::sleep(time::Duration::from_millis(50));
    };