Skip to content

Commit

Permalink
itests: Wait for both workers in TestWindowPostWorkerDisconnected
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Mar 6, 2023
1 parent b0ebdb6 commit 9c2f8ee
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions itests/worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,13 @@ func TestWindowPostWorkerDisconnected(t *testing.T) {
var goodWorker kit.TestWorker
ens.Worker(miner, &goodWorker, kit.WithTaskTypes([]sealtasks.TaskType{sealtasks.TTGenerateWindowPoSt}), kit.ThroughRPC()).Start()

// wait for all workers
require.Eventually(t, func() bool {
w, err := miner.WorkerStats(ctx)
require.NoError(t, err)
return len(w) == 3 // 2 post + 1 miner-builtin
}, 10*time.Second, 100*time.Millisecond)

tryDl := func(dl uint64) {
p, err := miner.ComputeWindowPoSt(ctx, dl, types.EmptyTSK)
require.NoError(t, err)
Expand Down

0 comments on commit 9c2f8ee

Please sign in to comment.