[BUG] TestStreamForServer fails in CI with QUIC port announcement error (not reproducible locally)
✅ 验证清单
- [x] 🔍 我已经搜索过 现有 Issues,确信这不是重复问题
🚀 Go 版本
1.25.0
📦 Dubbo-go 版本
v3.3.0
🖥️ 服务端配置
No response
💻 客户端配置
No response
🌐 协议配置
No response
📋 注册中心配置
No response
💾 操作系统
🐧 Linux
📝 Bug 描述
WARN triple_protocol/negotiation.go:244 Failed to set QUIC headers for /test: no port can be announced, specify it explicitly using Server.Port or Server.Addr
2025/12/23 06:22:25 http: TLS handshake error from 127.0.0.1:36564: read tcp 127.0.0.1:37861->127.0.0.1:36564: use of closed network connection
--- FAIL: TestStreamForServer (0.00s)
--- FAIL: TestStreamForServer/client-stream-conn (0.00s)
triple_ext_test.go:1668:
assertion: assert.Nil
got: unknown: write envelope: EOF
FAIL
🔄 重现步骤
Run make test locally: TestStreamForServer passes without errors. Run the same test in CI (GitHub Actions/GitLab CI/etc.): The test consistently fails with the above logs. No code changes (e.g., only comment modifications) trigger a full CI test run, which reproduces the failure (confirming it is environment-dependent, not code-dependent).
✅ 预期行为
The TestStreamForServer test should pass stably in both local and CI environments, with no port announcement or connection closure errors.
❌ 实际行为
In the server-side handler (the client-stream-conn subtest case), intentionally invoking stream.Conn().Send("not-proto") triggers an error, yet the server still returns a response afterward. Currently, a send error in StreamingHandlerConn causes the server to close/half-close the connection prematurely. When the client attempts to write the final frame during CloseAndReceive, it receives the error unknown: write envelope: EOF, while the test expects a nil result.
@CAICAIIs
I am unable to reproduce this problem, it works fine in my local and CI environments. Please allow me to verify if this issue exists.
He encountered a problem here: https://github.com/apache/dubbo-go/actions/runs/20453172952/job/58770084585
Two points of doubt:
- The problem seems to be with HTTP/3. My current guess is that triple HTTP/3 support on Steam is not yet fully developed. Since HTTP/3 uses the QUIC protocol, an EOF error will occur when the packet length is incorrect. See #2912 for more information.
- This unit test shouldn't be running HTTP/3 code. We need to investigate why there's a WARN log indicating a QUIC header is being set.
More Detail:2025-12-23T06:22:24.142Z WARN triple_protocol/negotiation.go:244 Failed to set QUIC headers for /test: no port can be announced, specify it explicitly using Server.Port or Server.Addr 2025-12-23T06:22:24.142Z WARN triple_protocol/negotiation.go:244 Failed to set QUIC headers for /test: no port can be announced, specify it explicitly using Server.Port or Server.Addr 2025/12/23 06:22:25 http: TLS handshake error from 127.0.0.1:36564: read tcp 127.0.0.1:37861->127.0.0.1:36564: use of closed network connection --- FAIL: TestStreamForServer (0.00s) --- FAIL: TestStreamForServer/client-stream-conn (0.00s) triple_ext_test.go:1668: assertion: assert.Nil got: unknown: write envelope: EOF
FAIL
close via #3379