diff --git a/testing/scenarios/feature_test.go b/testing/scenarios/feature_test.go index 454b2a616..3ff80d7d2 100644 --- a/testing/scenarios/feature_test.go +++ b/testing/scenarios/feature_test.go @@ -2,6 +2,7 @@ package scenarios import ( "context" + "io" "io/ioutil" "net/http" "net/url" @@ -441,8 +442,8 @@ func TestBlackhole(t *testing.T) { common.Must(err) defer CloseAllServers(servers) - if err := testTCPConn(serverPort2, 1024, time.Second*5)(); err != nil { - t.Error(err) + if err := testTCPConn(serverPort2, 1024, time.Second*5)(); err != io.EOF { + t.Error("unexpected error: ", err) } } diff --git a/testing/scenarios/shadowsocks_test.go b/testing/scenarios/shadowsocks_test.go index 1f2a3ae93..21fd94cf3 100644 --- a/testing/scenarios/shadowsocks_test.go +++ b/testing/scenarios/shadowsocks_test.go @@ -342,7 +342,7 @@ func TestShadowsocksChacha20TCP(t *testing.T) { var errg errgroup.Group for i := 0; i < 10; i++ { - errg.Go(testTCPConn(clientPort, 10240*1024, time.Second*20)) + errg.Go(testTCPConn(clientPort, 10240*1024, time.Second*40)) } if err := errg.Wait(); err != nil { diff --git a/testing/scenarios/vmess_test.go b/testing/scenarios/vmess_test.go index 9fe997780..413da2e8a 100644 --- a/testing/scenarios/vmess_test.go +++ b/testing/scenarios/vmess_test.go @@ -456,7 +456,7 @@ func TestVMessGCMUDP(t *testing.T) { var errg errgroup.Group for i := 0; i < 10; i++ { - errg.Go(testTCPConn(clientPort, 1024, time.Second*5)) + errg.Go(testUDPConn(clientPort, 1024, time.Second*5)) } if err := errg.Wait(); err != nil { t.Error(err)