From 28b5c8429d169c3a427104a969ed854f05db4323 Mon Sep 17 00:00:00 2001 From: Bryan Pfremmer <1383402+pfremm@users.noreply.github.com> Date: Sun, 1 Nov 2026 20:37:57 +0000 Subject: [PATCH] test(relay-e2e): pre-join the relay owner before toggling auto_join test_nip29_announce_channel_wire seeds a fresh relay owner and has it set auto_join=true then false. On a roster-less relay (CI), the owner's second admission auto-joins it into the now-default channel in the background, concurrently with the auto_join=false kind:9002. That join republishes kind:39000 from a channel row read without a lock; when it reads before the 9002 commits and stores after it, the latest 39000 still carries the bare auto_join tag and the assertion fails (CI run 41341005385). Self-join the relay owner before flagging the channel, so its later admissions have nothing to auto-join. Signed-off-by: Bryan Pfremmer <1383402+pfremm@users.noreply.github.com> --- crates/buzz-test-client/tests/e2e_relay.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/buzz-test-client/tests/e2e_relay.rs b/crates/buzz-test-client/tests/e2e_relay.rs index 39d7d74a6db..e21cbd90bf5 100644 --- a/crates/buzz-test-client/tests/e2e_relay.rs +++ b/crates/buzz-test-client/tests/e2e_relay.rs @@ -3833,6 +3833,14 @@ async fn test_nip29_announce_channel_wire() { assert!(msg.contains("relay owner or admin"), "{msg}"); let relay_owner = Keys::generate(); seed_relay_owner(&relay_owner).await; + // Join first so the relay owner's later admissions have nothing to + // auto-join: otherwise an admission while auto_join is on joins it here, + // and that join's kind:39000 republish can race the 9002 below and + // re-advertise the tag. + assert_eq!( + join_ws(&url, &channel_id, &relay_owner).await, + (true, String::new()) + ); assert_eq!( set_metadata_ws(&url, &channel_id, &relay_owner, "auto_join", "true").await, (true, String::new())