add more logging to flaky TestPeersTotal
Cannot reproduce the flakiness at the moment. The report suggests that connections are established on different transports. Adding logging to show what these transports are.
Petar Maymounkov committed
Oct 4, 2021 at 08:49 UTC
f50d43eb0d9826362d1c9a80c9c5cdee6e78d307
1 file changed
+1
-1
core/corehttp/metrics_test.go
+1
-1
@@ -46,7 +46,7 @@ func TestPeersTotal(t *testing.T) {
46
collector := IpfsNodeCollector{Node: node}
47
actual := collector.PeersTotalValues()
48
if len(actual) != 1 {
49
- t.Fatalf("expected 1 peers transport, got %d", len(actual))
49
+ t.Fatalf("expected 1 peers transport, got %d, transport map %v", len(actual), actual)
50
}
51
if actual["/ip4/tcp"] != float64(3) {
52
t.Fatalf("expected 3 peers, got %f", actual["/ip4/tcp"])