From 7a446fee2654d75b1861d729ef281cf4c06f602a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Pa=C3=9F?= <22845248+mpass99@users.noreply.github.com> Date: Tue, 14 Nov 2023 22:24:38 +0100 Subject: [PATCH] Fix flaky TestUpdateRunnersLogsErrorFromWatchAllocation. --- internal/runner/nomad_manager_test.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/internal/runner/nomad_manager_test.go b/internal/runner/nomad_manager_test.go index 3da7bb5..72b4c6e 100644 --- a/internal/runner/nomad_manager_test.go +++ b/internal/runner/nomad_manager_test.go @@ -260,13 +260,10 @@ func (s *ManagerTestSuite) TestUpdateRunnersLogsErrorFromWatchAllocation() { }) }) - go func() { - err := s.nomadRunnerManager.SynchronizeRunners(s.TestCtx) - if err != nil { - log.WithError(err).Error("failed to synchronize runners") - } - }() - <-time.After(10 * time.Millisecond) + err := s.nomadRunnerManager.SynchronizeRunners(s.TestCtx) + if err != nil { + log.WithError(err).Error("failed to synchronize runners") + } s.Require().Equal(3, len(hook.Entries)) s.Equal(logrus.ErrorLevel, hook.LastEntry().Level)