diff --git a/dkg/dkg_test.go b/dkg/dkg_test.go index 97e1dd2bf..44c161813 100644 --- a/dkg/dkg_test.go +++ b/dkg/dkg_test.go @@ -580,7 +580,7 @@ func (c *connTracker) AwaitN(t *testing.T, dkgErrChan chan error, n int, peerIdx ticker := time.NewTicker(time.Millisecond * 100) defer ticker.Stop() - timeout := time.NewTimer(time.Second * 5) + timeout := time.NewTimer(time.Second * 10) defer timeout.Stop() for { @@ -655,8 +655,12 @@ func startNewDKG(t *testing.T, parentCtx context.Context, config dkg.Config, dkg ctx, cancel := context.WithCancel(parentCtx) go func() { + jitter := time.Duration(rand.Intn(300)) * time.Millisecond + time.Sleep(jitter) + err := dkg.Run(ctx, config) log.Info(ctx, "DKG process returned", z.Any("error", err)) + select { case <-parentCtx.Done(): case dkgErrChan <- err: