CI: increase test sleep to fix flaky acquisition/file test under win (#2410)

* CI: increase test sleep to attempt fix for flaky windows acquitition/file test

* wip
This commit is contained in:
mmetc 2023-08-08 16:11:32 +02:00 committed by GitHub
parent 0334a9afe8
commit cd9d8f309d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -410,9 +410,7 @@ force_inotify: true`, testPattern),
if tc.expectedLines != 0 {
fd, err := os.Create("test_files/stream.log")
if err != nil {
t.Fatalf("could not create test file : %s", err)
}
require.NoError(t, err, "could not create test file")
for i := 0; i < 5; i++ {
_, err = fmt.Fprintf(fd, "%d\n", i)
@ -424,7 +422,7 @@ force_inotify: true`, testPattern),
fd.Close()
// we sleep to make sure we detect the new file
time.Sleep(1 * time.Second)
time.Sleep(3 * time.Second)
os.Remove("test_files/stream.log")
assert.Equal(t, tc.expectedLines, actualLines)
}