Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
e2e: Fix false-positive in canonical ref update test
Adrian Duke committed 3 days ago
commit 80d30d3b594264277fb827f0536788ea91eba13a
parent ed340f57242c0d9c80c2319056705f997f01507e
1 file changed +7 -0
modified crates/radicle-node/src/tests/e2e.rs
@@ -1691,13 +1691,20 @@ fn test_fetch_emits_canonical_ref_update() {
        .unwrap();
    assert!(result.is_success());

+
    // Drain all the events including initial `CanonicalRefUpdated`
+
    // from fetch
+
    while bob_events.try_recv().is_ok() {}
+

    let default_branch: git::fmt::Qualified = {
        let repo = alice.storage.repository(rid).unwrap();
        let proj = repo.project().unwrap();
        git::fmt::lit::refs_heads(proj.default_branch()).into()
    };
+

    alice.commit_to(rid, &default_branch);

+
    alice.handle.announce_refs_for(rid, [alice.id]).unwrap();
+

    bob_events
        .wait(
            |e| {