Skip to content

Commit 1660894

Browse files
authored
[FlakyTest] TestFileWatcher/does_not_emit_events_for_empty_files/emits_a_create_event_once_something_is_written_to_the_empty_file (#41848)
* Fixes flaky test TestFileWatcher
1 parent ec2f4a8 commit 1660894

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

filebeat/input/filestream/fswatch_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import (
3636
)
3737

3838
func TestFileWatcher(t *testing.T) {
39-
t.Skip("Flaky test: https://github.com/elastic/beats/issues/41209")
4039
dir := t.TempDir()
4140
paths := []string{filepath.Join(dir, "*.log")}
4241
cfgStr := `
@@ -261,10 +260,10 @@ scanner:
261260
paths := []string{filepath.Join(dir, "*.log")}
262261
cfgStr := `
263262
scanner:
264-
check_interval: 10ms
263+
check_interval: 50ms
265264
`
266265

267-
ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)
266+
ctx, cancel := context.WithTimeout(context.Background(), 1000*time.Millisecond)
268267
defer cancel()
269268

270269
logp.DevelopmentSetup(logp.ToObserverOutput())

0 commit comments

Comments
 (0)