Browse Source

autorelay: make sure relay service is up and running in tests

pull/1587/head
Marten Seemann 3 years ago
parent
commit
7229f4234e
  1. 8
      p2p/host/autorelay/autorelay_test.go

8
p2p/host/autorelay/autorelay_test.go

@ -61,6 +61,14 @@ func newRelay(t *testing.T) host.Host {
}),
)
require.NoError(t, err)
require.Eventually(t, func() bool {
for _, p := range h.Mux().Protocols() {
if p == circuitv2_proto.ProtoIDv2Hop {
return true
}
}
return false
}, 500*time.Millisecond, 10*time.Millisecond)
return h
}

Loading…
Cancel
Save