We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40c52e9 commit a4fb749Copy full SHA for a4fb749
spec/inputs/redis_spec.rb
@@ -26,12 +26,14 @@ def wait_events(conf, event_count)
26
end
27
28
def process(conf, event_count)
29
+ expect(event_count).to be > 0
30
events = wait_events(conf, event_count)
31
# due multiple workers we get events out-of-order in the output
32
events.sort! { |a, b| a.get('sequence') <=> b.get('sequence') }
- expect(events[0].get('sequence')).to eq(0)
33
- expect(events[100].get('sequence')).to eq(100)
34
- expect(events[1000].get('sequence')).to eq(1000)
+ [0, 100, 1000].each do |idx|
+ idx = [idx, event_count - 1].min
35
+ expect(events[idx].get('sequence')).to eq idx
36
+ end
37
38
39
# integration tests ---------------------
0 commit comments