From 7bed5eae96e013dfc6f2430c122fd7ef40d9b397 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 6 Oct 2026 00:13:57 -0700 Subject: [PATCH] test(max-age): keep JS debug logs off the ready handshake #4876 made js/net's debug logs unconditional, and Bun writes console.debug to stdout, so the JS publisher's first stdout line became 'negotiated ALPN' instead of 'ready'. Route debug logs to stderr in the client and drop the NODE_ENV that used to silence them. Co-Authored-By: Claude Opus 5.5 --- rs/moq-tokio/tests/max_age.rs | 1 - test/max-age/client.ts | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rs/moq-tokio/tests/max_age.rs b/rs/moq-tokio/tests/max_age.rs index 968f625e89..a7df20d121 100644 --- a/rs/moq-tokio/tests/max_age.rs +++ b/rs/moq-tokio/tests/max_age.rs @@ -65,7 +65,6 @@ async fn relay(version: moq_net::Version, javascript: Option) -> anyhow::R let mut child = if let Some(publish) = javascript { let script = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../../test/max-age/client.ts"); let mut child = tokio::process::Command::new("bun") - .env("NODE_ENV", "production") .arg(script) .arg(url.as_str()) .arg(version.alpn()) diff --git a/test/max-age/client.ts b/test/max-age/client.ts index efbb51357e..fb56b1612f 100644 --- a/test/max-age/client.ts +++ b/test/max-age/client.ts @@ -5,6 +5,9 @@ import { Producer } from "../../js/net/src/origin.ts"; import * as Path from "../../js/net/src/path.ts"; import { Milli } from "../../js/net/src/time.ts"; +// stdout carries the `ready` handshake to the Rust test, so library debug logs go to stderr. +console.debug = console.error; + const [address, protocol, mode] = process.argv.slice(2); if (!address || !protocol || !["publish", "subscribe"].includes(mode)) throw new Error("expected URL ALPN publish|subscribe");