Skip to content

Commit

Permalink
fix #263: use filter in lieu of filter_stream as recommended optimiza…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
jcantrill committed Jan 25, 2021
1 parent b87f564 commit be14c9f
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions test/plugin/test_filter_kubernetes_metadata.rb
Expand Up @@ -145,18 +145,9 @@ def emit_with_tag(tag, msg = {}, config = '
')
d = create_driver(config)
d.run(default_tag: tag) do
d.feed(@time, msg)
d.feed(msg)
end
d.filtered.map(&:last)
end

test 'nil event stream' do
# not certain how this is possible but adding test to properly
# guard against this condition we have seen - test for nil,
# empty, no empty method, not an event stream
plugin = create_driver.instance
plugin.filter_stream('tag', nil)
plugin.filter_stream('tag', Fluent::MultiEventStream.new)
d.filtered_records
end

test 'inability to connect to the api server handles exception and doensnt block pipeline' do
Expand Down

0 comments on commit be14c9f

Please sign in to comment.