diff --git a/itests/worker_test.go b/itests/worker_test.go index 42c7acdb8bd..4e845afe8e5 100644 --- a/itests/worker_test.go +++ b/itests/worker_test.go @@ -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)