diff --git a/apps/figcraft-server/src/server_tests.rs b/apps/figcraft-server/src/server_tests.rs index 153bb5ab..f60150da 100644 --- a/apps/figcraft-server/src/server_tests.rs +++ b/apps/figcraft-server/src/server_tests.rs @@ -261,7 +261,9 @@ fn fuzzed_frames_dont_hurt_the_server() { break; } } - let _ = ws.read(); + // read() returns Result, not a lock guard; the fuzz loop ends here on purpose and + // the close frame from the server is not interesting. + let _ = ws.read(); // NOSONAR } // Still serving, the file intact. let mut b = join(&p.edit, "Bo"); diff --git a/crates/collab-net/src/code_tests.rs b/crates/collab-net/src/code_tests.rs index 4880242f..7fe766ec 100644 --- a/crates/collab-net/src/code_tests.rs +++ b/crates/collab-net/src/code_tests.rs @@ -141,7 +141,9 @@ fn old_server() -> (Endpoint, std::thread::JoinHandle<()>) { let t = std::thread::spawn(move || { for stream in listener.incoming().take(2).flatten() { let Ok(mut ws) = tungstenite::accept(stream) else { continue }; - let _ = ws.read(); + // read() returns Result, not a lock guard; this test server deliberately + // ignores whatever the client sent first. + let _ = ws.read(); // NOSONAR let refused = ServerMsg::Refused { reason: "that message couldn't be read".into() }; let _ = ws.send(Message::Binary(Bytes::from(message::encode(&refused).unwrap()))); let _ = ws.close(None);