voelin-gpui: the connect test makes no DNS query

a_connect_reaches_the_engine_and_its_answer_reaches_the_rail connects a
server called ts.example, and a connect looks the server's gateway up:
SRV queries for _tsgws._tcp.ts.example sent to the resolver (docs/ci.md
says tests use no DNS). The test now marks the lookup done before the
connect, as the second connect of a run finds it, and its comment says so
(it also claimed nothing left the machine).

strace -f -e trace=connect,sendto,sendmsg,sendmmsg on the lib test binary:
the old binary's test sends to 127.0.0.53:53 (and asks nscd over a unix
socket); the new one, alone and with all 79 tests of the binary, makes
no connect and no send at all.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-27 19:32:14 +03:00
1 parent 806f9c6f2e
commit 01bf128c58
1 file changed
+10 -4
+10 -4
View File
@@ -1309,9 +1309,12 @@ mod tests {
}
/// The real path of a connect: the action's method sends the command, the
/// engine (with no connector, so that nothing leaves the machine and no
/// sound device opens) takes it and answers with its events, which the
/// entity's loop turns into the state the rail shows.
/// engine (with no connector, so that no sound device opens) takes it and
/// answers with its events, which the entity's loop turns into the state
/// the rail shows. A connect also looks the server's gateway up, which is
/// DNS (SRV queries for the server's name) and docs/ci.md says tests use
/// none: the lookup is marked done before the connect, as a second connect
/// of a run finds it, so nothing leaves the machine.
#[gpui::test]
fn a_connect_reaches_the_engine_and_its_answer_reaches_the_rail(cx: &mut TestAppContext) {
cx.executor().allow_parking();
@@ -1330,7 +1333,10 @@ mod tests {
};
let app = cx.new(|cx| AppState::new(setup, cx));
let id = app.read_with(cx, |app, _| app.vm.bookmarks[0].id);
app.update(cx, |app, cx| app.connect_voice(cx));
app.update(cx, |app, cx| {
app.vm.gateways_looked_up.insert(id);
app.connect_voice(cx)
});
app.read_with(cx, |app, _| {
assert_eq!(app.vm.status, "Connecting to ts.example…");
});