Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/filelog] Limit files consumed per polling cycle #18477

Merged
merged 7 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added config marshal test for config poll_file_limit
Signed-off-by: Corbin Phelps <[email protected]>
  • Loading branch information
Corbin Phelps committed Feb 9, 2023
commit 50f074241ef22b5beaca619f806139ccb558ed3b
8 changes: 8 additions & 0 deletions pkg/stanza/fileconsumer/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,14 @@ func TestUnmarshal(t *testing.T) {
return newMockOperatorConfig(cfg)
}(),
},
{
Name: "poll_file_limit_1",
Expect: func() *mockOperatorConfig {
cfg := NewConfig()
cfg.PollFileLimit = 1
djaglowski marked this conversation as resolved.
Show resolved Hide resolved
return newMockOperatorConfig(cfg)
}(),
},
},
}.Run(t)
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/stanza/fileconsumer/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,6 @@ poll_interval_no_units:
start_at_string:
type: mock
start_at: "beginning"
poll_file_limit_1:
type: mock
poll_file_limit: 1