test(relay): retain root lifecycle registration during revalidation

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Brad Seiler <seiler@squareup.com>
This commit is contained in:
Brad Seiler
2026-10-09 19:28:36 -04:00
parent 1b1f5a23f4
commit 8382528486

View File

@@ -3156,12 +3156,18 @@ mod tests {
.expect("owner proof");
let tag = serde_json::from_str(&tag).expect("owner tag JSON");
let mut connections = Vec::new();
let mut lifecycle_guards = Vec::new();
for (keys, tag, challenge) in [
(&member, None, "durable-member"),
(&agent, Some(tag), "durable-agent"),
(&bystander, None, "durable-bystander"),
] {
let (conn, _control) = registered_pending_conn(&state, community, challenge);
lifecycle_guards.push(state.community_connections.register(
conn.conn_id,
community,
conn.community_control.clone(),
));
handle_auth(
signed_auth(keys, challenge, tag),
Arc::clone(&conn),