Skip to content

Commit

Permalink
test: improve debuggability
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Apr 30, 2021
1 parent 1626ecf commit 9ed5235
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions p2p/host/basic/basic_host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,16 +532,16 @@ func TestProtoDowngrade(t *testing.T) {
t.Fatal(err)
}

if s2.Protocol() != "/testing" {
t.Fatal("shoould have gotten /testing")
}

_, err = s2.Write(nil)
if err != nil {
t.Fatal(err)
}

assertWait(t, connectedOn, "/testing")

if s2.Protocol() != "/testing" {
t.Fatal("shoould have gotten /testing")
}
s2.Close()

}
Expand Down
2 changes: 1 addition & 1 deletion p2p/protocol/identify/obsaddr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func TestObsAddrSet(t *testing.T) {
harness.oas.SetTTL(time.Millisecond * 200)
time.Sleep(time.Millisecond * 300)
if !addrsMatch(harness.oas.Addrs(), []ma.Multiaddr{a1, a2}) {
t.Error("addrs should only have a1, a2")
t.Errorf("addrs should only have %s, %s; have %s", a1, a2, harness.oas.Addrs())
}

// disconnect from all but b5.
Expand Down

0 comments on commit 9ed5235

Please sign in to comment.