Merge pull request #3 from micro/master

update fork
This commit is contained in:
potato 2019-08-11 18:24:57 +08:00 committed by GitHub
commit 94127ae1aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,28 +54,6 @@ func testSend(t *testing.T, tun Tunnel) {
} }
func TestTunnel(t *testing.T) { func TestTunnel(t *testing.T) {
// create a new listener
tun := NewTunnel(Nodes("127.0.0.1:9096"))
err := tun.Connect()
if err != nil {
t.Fatal(err)
}
defer tun.Close()
var wg sync.WaitGroup
// start accepting connections
wg.Add(1)
go testAccept(t, tun, &wg)
// send a message
testSend(t, tun)
// wait until message is received
wg.Wait()
}
func TestTwoTunnel(t *testing.T) {
// create a new tunnel client // create a new tunnel client
tunA := NewTunnel( tunA := NewTunnel(
Address("127.0.0.1:9096"), Address("127.0.0.1:9096"),