1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

fix broken tests

This commit is contained in:
Darien Raymond 2019-02-06 12:11:09 +01:00
parent 4613008148
commit e0581b6c82
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
3 changed files with 5 additions and 4 deletions

View File

@ -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)
}
}

View File

@ -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 {

View File

@ -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)