Skip to content

Commit

Permalink
Some existing test assume the number of buffer queue is larger than 1.
Browse files Browse the repository at this point in the history
We have smaller queued_chunks_limit_size tests so
set larger value, 100 in this patch, is enough for existing tests.

Signed-off-by: Masahiro Nakagawa <[email protected]>
  • Loading branch information
repeatedly committed Nov 9, 2018
1 parent db8c462 commit ec05947
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/plugin/test_buffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def create_chunk_es(metadata, es)

sub_test_case 'with default configuration and dummy implementation' do
setup do
@p = create_buffer({})
@p = create_buffer({'queued_chunks_limit_size' => 100})
@dm0 = create_metadata(Time.parse('2016-04-11 16:00:00 +0000').to_i, nil, nil)
@dm1 = create_metadata(Time.parse('2016-04-11 16:10:00 +0000').to_i, nil, nil)
@dm2 = create_metadata(Time.parse('2016-04-11 16:20:00 +0000').to_i, nil, nil)
Expand Down
1 change: 1 addition & 0 deletions test/plugin/test_output_as_buffered.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,7 @@ def waiting(seconds)
'flush_thread_count' => 1,
'flush_thread_burst_interval' => 0.1,
'chunk_limit_size' => 1024,
'queued_chunks_limit_size' => 100
}
@i = create_output(:buffered)
@i.configure(config_element('ROOT','',{},[config_element('buffer',chunk_key,hash)]))
Expand Down
8 changes: 8 additions & 0 deletions test/plugin/test_output_as_buffered_retries.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def get_log_time(msg, logs)
'flush_interval' => 1,
'flush_thread_burst_interval' => 0.1,
'retry_randomize' => false,
'queued_chunks_limit_size' => 100
}
@i.configure(config_element('ROOT','',{},[config_element('buffer',chunk_key,hash)]))
@i.register(:prefer_buffered_processing){ true }
Expand Down Expand Up @@ -252,6 +253,7 @@ def get_log_time(msg, logs)
'flush_thread_burst_interval' => 0.1,
'retry_randomize' => false,
'retry_timeout' => 3600,
'queued_chunks_limit_size' => 100
}
@i.configure(config_element('ROOT','',{},[config_element('buffer',chunk_key,hash)]))
@i.register(:prefer_buffered_processing){ true }
Expand Down Expand Up @@ -342,6 +344,7 @@ def get_log_time(msg, logs)
'flush_thread_burst_interval' => 0.1,
'retry_randomize' => false,
'retry_max_times' => 10,
'queued_chunks_limit_size' => 100
}
@i.configure(config_element('ROOT','',{},[config_element('buffer',chunk_key,hash)]))
@i.register(:prefer_buffered_processing){ true }
Expand Down Expand Up @@ -485,6 +488,7 @@ def get_log_time(msg, logs)
'retry_type' => :periodic,
'retry_wait' => 3,
'retry_randomize' => false,
'queued_chunks_limit_size' => 100
}
@i.configure(config_element('ROOT','',{},[config_element('buffer',chunk_key,hash)]))
@i.register(:prefer_buffered_processing){ true }
Expand Down Expand Up @@ -531,6 +535,7 @@ def get_log_time(msg, logs)
'retry_wait' => 30,
'retry_randomize' => false,
'retry_timeout' => 120,
'queued_chunks_limit_size' => 100
}
@i.configure(config_element('ROOT','',{},[config_element('buffer',chunk_key,hash)]))
@i.register(:prefer_buffered_processing){ true }
Expand Down Expand Up @@ -626,6 +631,7 @@ def get_log_time(msg, logs)
'retry_wait' => 3,
'retry_randomize' => false,
'retry_max_times' => 10,
'queued_chunks_limit_size' => 100
}
@i.configure(config_element('ROOT','',{},[config_element('buffer',chunk_key,hash)]))
@i.register(:prefer_buffered_processing){ true }
Expand Down Expand Up @@ -724,6 +730,7 @@ def get_log_time(msg, logs)
'retry_randomize' => false,
'retry_timeout' => 3600,
'retry_max_times' => 10,
'queued_chunks_limit_size' => 100
}
@i.configure(config_element('ROOT','',{},[config_element('buffer',chunk_key,hash)]))
@i.register(:prefer_buffered_processing){ true }
Expand Down Expand Up @@ -795,6 +802,7 @@ def get_log_time(msg, logs)
'retry_wait' => 30,
'retry_timeout' => 360,
'retry_max_times' => 10,
'queued_chunks_limit_size' => 100
}
@i.configure(config_element('ROOT','',{},[config_element('buffer',chunk_key,hash)]))
@i.register(:prefer_buffered_processing){ true }
Expand Down
2 changes: 1 addition & 1 deletion test/plugin/test_output_as_buffered_secondary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def dummy_event_stream
test 'secondary plugin can do delayed commit even if primary does not do it, and non-committed chunks will be rollbacked by primary' do
written = []
chunks = []
priconf = config_element('buffer','tag',{'flush_interval' => 1, 'retry_type' => :periodic, 'retry_wait' => 3, 'retry_timeout' => 60, 'delayed_commit_timeout' => 2, 'retry_randomize' => false})
priconf = config_element('buffer','tag',{'flush_interval' => 1, 'retry_type' => :periodic, 'retry_wait' => 3, 'retry_timeout' => 60, 'delayed_commit_timeout' => 2, 'retry_randomize' => false, 'queued_chunks_limit_size' => 10})
secconf = config_element('secondary','',{'@type' => 'output_secondary_test2'})
@i.configure(config_element('ROOT','',{},[priconf,secconf]))
@i.register(:prefer_buffered_processing){ true }
Expand Down

0 comments on commit ec05947

Please sign in to comment.