fix(tests): stabilize local network fixtures

Keep the TUIC stream fragmentation check on a working UDP loopback path,
allocate the AmneziaWG fixture ports dynamically, and wait for a real
Xray stats response before starting API mutation assertions. Recreate
failed readiness channels so an early connection cannot stall the probe.

Verified host and offline parallel Go suites, repeated occupied-port and
UDP tests, race/shuffle runs, and golangci-lint. Production behavior and
dependency versions are unchanged.

Split out of #6877 so that pull request's squash carries only the feature.
This commit is contained in:
YoungReckless4
2026-10-22 14:23:13 +03:00
committed by MHSanaei
parent 96069e9393
commit 39935ed9ef
5 changed files with 80 additions and 11 deletions
+1
View File
@@ -111,6 +111,7 @@ func startE2ECore(t *testing.T, inbounds []any) *e2eCore {
t.Fatalf("api init: %v", err)
}
t.Cleanup(api.Close)
waitForXrayAPIReady(t, api, apiPort)
return &e2eCore{api: api, cmd: cmd, port: apiPort}
}