mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-07 21:55:01 +03:00
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:
@@ -410,7 +410,7 @@ func TestServerUDPStreamE2E(t *testing.T) {
|
||||
|
||||
func testServerUDPStreamE2E(t *testing.T, controller string) {
|
||||
certPEM, keyPEM := generateTestCert(t)
|
||||
socksAddr, socksCleanup := startMockSocks5Server(t, "stream@example.com", "mock-socks-pass")
|
||||
socksAddr, socksCleanup := startMockSocks5ServerWithUDPLoopback(t, udpEchoLoopback(t), "stream@example.com", "mock-socks-pass")
|
||||
defer socksCleanup()
|
||||
|
||||
testUUID := uuid.New()
|
||||
|
||||
Reference in New Issue
Block a user