Skip to content

Commit b251fb3

Browse files
author
Juuso Mäyränen
committed
Update tests
1 parent 27eefc8 commit b251fb3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

spec/inputs/redis_spec.rb

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,28 @@ def process(conf, event_count)
7272
type => "blah"
7373
key => "#{key}.*"
7474
data_type => "pattern_list"
75+
batch_count => 1
76+
}
77+
}
78+
CONFIG
79+
total_event_count = 0
80+
(0..10).each do |idx|
81+
event_count = 100 + rand(50)
82+
total_event_count += event_count
83+
populate("#{key_base}.#{idx}", event_count)
84+
end
85+
process(conf, total_event_count)
86+
end
87+
88+
it "should read events from a list pattern using batch_count (default 125)" do
89+
key_base = SecureRandom.hex
90+
conf = <<-CONFIG
91+
input {
92+
redis {
93+
type => "blah"
94+
key => "#{key}.*"
95+
data_type => "pattern_list"
96+
batch_count => 125
7597
}
7698
}
7799
CONFIG

0 commit comments

Comments
 (0)