diff --git a/libbeat/common/file/rotator_test.go b/libbeat/common/file/rotator_test.go index 71d8f81d422c..585d1690e788 100644 --- a/libbeat/common/file/rotator_test.go +++ b/libbeat/common/file/rotator_test.go @@ -216,7 +216,7 @@ func TestRotateDateSuffix(t *testing.T) { firstExpectedPattern := fmt.Sprintf("%s-%s.*", logname, time.Now().Format("20060102150405")) AssertDirContentsPattern(t, dir, firstExpectedPattern) - time.Sleep(1500 * time.Millisecond) + time.Sleep(2 * time.Second) secondExpectedPattern := fmt.Sprintf("%s-%s.*", logname, time.Now().Format("20060102150405")) Rotate(t, r) @@ -224,7 +224,7 @@ func TestRotateDateSuffix(t *testing.T) { AssertDirContentsPattern(t, dir, firstExpectedPattern, secondExpectedPattern) - time.Sleep(1500 * time.Millisecond) + time.Sleep(2 * time.Second) thirdExpectedPattern := fmt.Sprintf("%s-%s.*", logname, time.Now().Format("20060102150405")) Rotate(t, r)