1
0
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:
Darien Raymond 2019-02-06 11:53:33 +01:00
parent 729e448a35
commit 4613008148
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
3 changed files with 5 additions and 4 deletions

View File

@ -3,6 +3,7 @@ package scenarios
import (
"context"
"fmt"
"io"
"testing"
"time"
@ -264,8 +265,8 @@ func TestCommanderAddRemoveUser(t *testing.T) {
common.Must(err)
defer CloseAllServers(servers)
if err := testTCPConn(clientPort, 1024, time.Second*5)(); err != nil {
t.Fatal(err)
if err := testTCPConn(clientPort, 1024, time.Second*5)(); err != io.EOF {
t.Fatal("expected error: ", err)
}
cmdConn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", cmdPort), grpc.WithInsecure(), grpc.WithBlock())

View File

@ -537,7 +537,7 @@ func TestUDPConnection(t *testing.T) {
servers, err := InitializeServerConfigs(clientConfig)
common.Must(err)
CloseAllServers(servers)
defer CloseAllServers(servers)
if err := testUDPConn(clientPort, 1024, time.Second*5)(); err != nil {
t.Error(err)

View File

@ -452,7 +452,7 @@ func TestVMessGCMUDP(t *testing.T) {
servers, err := InitializeServerConfigs(serverConfig, clientConfig)
common.Must(err)
CloseAllServers(servers)
defer CloseAllServers(servers)
var errg errgroup.Group
for i := 0; i < 10; i++ {