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
729e448a35
commit
4613008148
@ -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())
|
||||
|
@ -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)
|
||||
|
@ -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++ {
|
||||
|
Loading…
Reference in New Issue
Block a user