diff --git a/testing/endtoend/endtoend_test.go b/testing/endtoend/endtoend_test.go index c9ccbf7be..fcdec3441 100644 --- a/testing/endtoend/endtoend_test.go +++ b/testing/endtoend/endtoend_test.go @@ -380,6 +380,10 @@ func (r *testRunner) testBeaconChainSync(ctx context.Context, g *errgroup.Group, // Sleep a slot to make sure the synced state is made. time.Sleep(time.Duration(params.BeaconConfig().SecondsPerSlot) * time.Second) syncEvaluators := []e2etypes.Evaluator{ev.FinishedSyncing, ev.AllNodesHaveSameHead} + // Only execute in the middle of an epoch to prevent race conditions around slot 0. + ticker := helpers.NewEpochTicker(tickingStartTime, secondsPerEpoch) + <-ticker.C() + ticker.Done() for _, evaluator := range syncEvaluators { t.Run(evaluator.Name, func(t *testing.T) { assert.NoError(t, evaluator.Evaluation(nil, conns...), "Evaluation failed for sync node")