Fixes e2e "chain started" check (#7311)

* fixes e2e test
This commit is contained in:
Victor Farazdagi
2020-09-23 00:34:38 +03:00
committed by GitHub
parent b09b1f3fa5
commit 568cd3c9ec
2 changed files with 2 additions and 1 deletions

View File

@@ -253,6 +253,7 @@ func (s *Service) registerHandlers() {
stateSub.Unsubscribe()
time.Sleep(timeutils.Until(data.StartTime))
}
log.WithField("starttime", data.StartTime).Debug("Chain started in sync service")
s.chainStarted = true
}
case <-s.ctx.Done():

View File

@@ -58,7 +58,7 @@ func runEndToEndTest(t *testing.T, config *types.E2EConfig) {
beaconLogFile, err := os.Open(path.Join(e2e.TestParams.LogPath, fmt.Sprintf(e2e.BeaconNodeLogFileName, 0)))
require.NoError(t, err)
t.Run("chain started", func(t *testing.T) {
require.NoError(t, helpers.WaitForTextInFile(beaconLogFile, "Chain started within the last epoch"), "Chain did not start")
require.NoError(t, helpers.WaitForTextInFile(beaconLogFile, "Chain started in sync service"), "Chain did not start")
})
// Failing early in case chain doesn't start.