Skip to content

Commit

Permalink
dkg: fixing TestSyncFlow
Browse files Browse the repository at this point in the history
  • Loading branch information
pinebit committed Dec 11, 2024
1 parent b84b636 commit 5f0cd2a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dkg/dkg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 5f0cd2a

Please sign in to comment.