Skip to content

Commit

Permalink
set default limit to 10MB
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrav committed Jan 18, 2024
1 parent c6853d2 commit 64debea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/writers/buffered_file_writer/bufferedfilewriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func WithThreshold(threshold uint64) Option {

// New creates a new BufferedFileWriter with the given options.
func New(opts ...Option) *BufferedFileWriter {
const defaultThreshold = 20 * 1024 * 1024 // 20MB
const defaultThreshold = 10 * 1024 * 1024 // 10MB
w := &BufferedFileWriter{threshold: defaultThreshold}
for _, opt := range opts {
opt(w)
Expand Down
4 changes: 2 additions & 2 deletions pkg/writers/buffered_file_writer/bufferedfilewriter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ func TestBufferedFileWriterNewThreshold(t *testing.T) {
t.Parallel()

const (
defaultThreshold = 20 * 1024 * 1024 // 20MB
customThreshold = 10 * 1024 * 1024 // 10MB
defaultThreshold = 10 * 1024 * 1024 // 10MB
customThreshold = 20 * 1024 * 1024 // 20MB
)

tests := []struct {
Expand Down

0 comments on commit 64debea

Please sign in to comment.