Skip to content

Commit

Permalink
try tweaking some times to reduce flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
BinaryFissionGames committed Feb 16, 2022
1 parent 55abccb commit 9128643
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions operator/builtin/input/file/rotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,23 +285,23 @@ func TestRotation(t *testing.T) {
maxLinesPerFile: 10,
maxBackupFiles: 1,
writeInterval: time.Millisecond,
pollInterval: 20 * time.Millisecond,
pollInterval: 10 * time.Millisecond,
},
{
name: "Fast/NoDeletion",
totalLines: 20,
maxLinesPerFile: 10,
maxBackupFiles: 1,
writeInterval: time.Millisecond,
pollInterval: 20 * time.Millisecond,
pollInterval: 10 * time.Millisecond,
},
{
name: "Fast/Deletion",
totalLines: 30,
maxLinesPerFile: 10,
maxBackupFiles: 1,
writeInterval: time.Millisecond,
pollInterval: 20 * time.Millisecond,
pollInterval: 10 * time.Millisecond,
ephemeralLines: true,
},
{
Expand All @@ -310,7 +310,7 @@ func TestRotation(t *testing.T) {
maxLinesPerFile: 100,
maxBackupFiles: 1,
writeInterval: time.Millisecond,
pollInterval: 20 * time.Millisecond,
pollInterval: 10 * time.Millisecond,
ephemeralLines: true,
},
{
Expand All @@ -319,31 +319,31 @@ func TestRotation(t *testing.T) {
maxLinesPerFile: 10,
maxBackupFiles: 1,
writeInterval: 3 * time.Millisecond,
pollInterval: 20 * time.Millisecond,
pollInterval: 10 * time.Millisecond,
},
{
name: "Slow/NoDeletion",
totalLines: 20,
maxLinesPerFile: 10,
maxBackupFiles: 1,
writeInterval: 3 * time.Millisecond,
pollInterval: 20 * time.Millisecond,
pollInterval: 10 * time.Millisecond,
},
{
name: "Slow/Deletion",
totalLines: 30,
maxLinesPerFile: 10,
maxBackupFiles: 1,
writeInterval: 3 * time.Millisecond,
pollInterval: 20 * time.Millisecond,
pollInterval: 10 * time.Millisecond,
},
{
name: "Slow/Deletion/ExceedFingerprint",
totalLines: 100,
maxLinesPerFile: 25, // ~20 is just enough to exceed 1000 bytes fingerprint at 50 chars per line
maxBackupFiles: 2,
writeInterval: 3 * time.Millisecond,
pollInterval: 20 * time.Millisecond,
pollInterval: 10 * time.Millisecond,
},
}

Expand Down
2 changes: 1 addition & 1 deletion operator/flusher/flusher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestFlusher(t *testing.T) {
func TestMaxElapsedTime(t *testing.T) {

// Override setting for test
maxElapsedTime = 100 * time.Millisecond
maxElapsedTime = 1 * time.Second

flusherCfg := NewConfig()
flusher := flusherCfg.Build(zaptest.NewLogger(t).Sugar())
Expand Down

0 comments on commit 9128643

Please sign in to comment.