Commit 0b90707e authored by Jeromy's avatar Jeromy
Browse files

update transport dep and add host test

parent 82dba851
......@@ -214,3 +214,31 @@ func TestHostProtoPreknowledge(t *testing.T) {
s.Close()
}
func TestNewDialOld(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
h1, h2 := getHostPair(ctx, t)
defer h1.Close()
defer h2.Close()
connectedOn := make(chan protocol.ID, 16)
h1.SetStreamHandler("/testing", func(s inet.Stream) {
connectedOn <- s.Protocol()
s.Close()
})
s, err := h2.NewStream(ctx, h1.ID(), "/testing/1.0.0", "/testing")
if err != nil {
t.Fatal(err)
}
assertWait(t, connectedOn, "/testing")
if s.Protocol() != "/testing" {
t.Fatal("shoould have gotten /testing")
}
s.Close()
}
......@@ -159,9 +159,9 @@
},
{
"author": "whyrusleeping",
"hash": "Qmep1A25MDNZxMno8oHZ5ForA5T2gw1EXAGdZzGCCpDD4n",
"hash": "QmbRuJ16EfPGWuEguoNxwPacpeHFUAZb2XQXVvUt5Vxg5q",
"name": "go-libp2p-transport",
"version": "1.3.4"
"version": "1.3.5"
},
{
"author": "whyrusleeping",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment