Skip to content

Commit

Permalink
Stabilize TestFilestreamTruncate test
Browse files Browse the repository at this point in the history
Closes #25217
  • Loading branch information
kvch committed Apr 23, 2021
1 parent 2bbcd6c commit edc3368
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 edc3368

Please sign in to comment.