Skip to content

Commit

Permalink
[logs] fix flaky test (make sure file is synced on disk) (#18590)
Browse files Browse the repository at this point in the history
  • Loading branch information
remeh committed Aug 4, 2023
1 parent ce4ad64 commit 8846241
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/logs/internal/launchers/file/launcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ func (suite *LauncherTestSuite) TestLauncherScanWithLogRotationCopyTruncate() {
_, err = suite.testFile.WriteString("third\n")
suite.Nil(err)

suite.Nil(suite.testFile.Sync())
s.scan()

newTailer, _ = s.tailers.Get(getScanKey(suite.testPath, suite.source))
suite.True(tailer != newTailer)

Expand Down

0 comments on commit 8846241

Please sign in to comment.