don't hang tests on dial failure
@@ -27,13 +27,13 @@ func TestSimultOpen(t *testing.T) {
{
var wg sync.WaitGroup
connect := func(s *Swarm, dst peer.ID, addr ma.Multiaddr) {
+ defer wg.Done()
// copy for other peer
log.Debugf("TestSimultOpen: connecting: %s --> %s (%s)", s.LocalPeer(), dst, addr)
s.Peerstore().AddAddr(dst, addr, pstore.PermanentAddrTTL)
if _, err := s.DialPeer(ctx, dst); err != nil {
- t.Fatal("error swarm dialing to peer", err)
+ t.Error("error swarm dialing to peer", err)
}
- wg.Done()
}
log.Info("Connecting swarms simultaneously.")
