mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 09:36:34 -05:00
fix broken tests
This commit is contained in:
parent
4613008148
commit
e0581b6c82
@ -2,6 +2,7 @@ package scenarios
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
@ -441,8 +442,8 @@ func TestBlackhole(t *testing.T) {
|
|||||||
common.Must(err)
|
common.Must(err)
|
||||||
defer CloseAllServers(servers)
|
defer CloseAllServers(servers)
|
||||||
|
|
||||||
if err := testTCPConn(serverPort2, 1024, time.Second*5)(); err != nil {
|
if err := testTCPConn(serverPort2, 1024, time.Second*5)(); err != io.EOF {
|
||||||
t.Error(err)
|
t.Error("unexpected error: ", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ func TestShadowsocksChacha20TCP(t *testing.T) {
|
|||||||
|
|
||||||
var errg errgroup.Group
|
var errg errgroup.Group
|
||||||
for i := 0; i < 10; i++ {
|
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 {
|
if err := errg.Wait(); err != nil {
|
||||||
|
@ -456,7 +456,7 @@ func TestVMessGCMUDP(t *testing.T) {
|
|||||||
|
|
||||||
var errg errgroup.Group
|
var errg errgroup.Group
|
||||||
for i := 0; i < 10; i++ {
|
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 {
|
if err := errg.Wait(); err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user