Skip to content

Commit

Permalink
Try to fix route group test conn
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkren committed Jan 29, 2020
1 parent 1d03580 commit 61c8b8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions pkg/router/route_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ package router
import (
"context"
"fmt"
"golang.org/x/net/nettest"
"io"
"math/rand"
"net"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -680,7 +682,7 @@ func TestRouteGroup_RemoteAddr(t *testing.T) {
}

// TODO (Darkren): uncomment and fix
/*func TestRouteGroup_TestConn(t *testing.T) {
func TestRouteGroup_TestConn(t *testing.T) {
mp := func() (c1, c2 net.Conn, stop func(), err error) {
keys := snettest.GenKeyPairs(2)

Expand Down Expand Up @@ -740,15 +742,15 @@ func TestRouteGroup_RemoteAddr(t *testing.T) {
if err := rg1.Close(); err != nil {
//panic(err)
}
nEnv.Teardown()
cancel()
nEnv.Teardown()
}

return rg0, rg1, stop, nil
}

nettest.TestConn(t, mp)
}*/
}

func pushPackets(ctx context.Context, from *transport.Manager, to *RouteGroup) {
for {
Expand Down
6 changes: 3 additions & 3 deletions vendor/golang.org/x/net/nettest/conntest.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 61c8b8a

Please sign in to comment.