Browse Source

fix broken tests

pull/1546/head
Darien Raymond 6 years ago
parent
commit
e0581b6c82
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
  1. 5
      testing/scenarios/feature_test.go
  2. 2
      testing/scenarios/shadowsocks_test.go
  3. 2
      testing/scenarios/vmess_test.go

5
testing/scenarios/feature_test.go

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

2
testing/scenarios/shadowsocks_test.go

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

2
testing/scenarios/vmess_test.go

@ -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…
Cancel
Save