Skip to content

Commit

Permalink
Stabilize TestFilestreamTruncate test (#25273) (#25280)
Browse files Browse the repository at this point in the history
Closes #25217

(cherry picked from commit 08caa4e)

Co-authored-by: Noémi Ványi <kvch@users.noreply.github.com>
  • Loading branch information
mergify[bot] and kvch authored Apr 28, 2021
1 parent 57de23b commit 5d3a3f0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions filebeat/input/filestream/input_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -860,8 +860,6 @@ func TestFilestreamSymlinkRemoved(t *testing.T) {

// test_truncate from test_harvester.py
func TestFilestreamTruncate(t *testing.T) {
t.Skip("Flaky test: https://github.com/elastic/beats/issues/25217")

env := newInputTestingEnvironment(t)

testlogName := "test.log"
Expand All @@ -870,8 +868,9 @@ func TestFilestreamTruncate(t *testing.T) {
"paths": []string{
env.abspath("*"),
},
"prospector.scanner.check_interval": "1ms",
"prospector.scanner.symlinks": "true",
"prospector.scanner.check_interval": "1ms",
"prospector.scanner.resend_on_touch": "true",
"prospector.scanner.symlinks": "true",
})

lines := []byte("first line\nsecond line\nthird line\n")
Expand All @@ -897,8 +896,7 @@ func TestFilestreamTruncate(t *testing.T) {
moreLines := []byte("forth line\nfifth line\n")
env.mustWriteLinesToFile(testlogName, moreLines)

env.waitUntilEventCount(5)
env.requireOffsetInRegistry(testlogName, len(moreLines))
env.waitUntilOffsetInRegistry(testlogName, len(moreLines))

cancelInput()
env.waitUntilInputStops()
Expand Down

0 comments on commit 5d3a3f0

Please sign in to comment.