spec/inputs/lumberjack_spec.rb in logstash-input-lumberjack-1.0.3 vs spec/inputs/lumberjack_spec.rb in logstash-input-lumberjack-1.0.4

- old
+ new

@@ -5,10 +5,11 @@ require "logstash/codecs/plain" require "logstash/codecs/multiline" require "logstash/event" require "lumberjack/client" +Thread.abort_on_exception = true describe LogStash::Inputs::Lumberjack do let(:connection) { double("connection") } let(:certificate) { LogStashTest.certificate } let(:port) { LogStashTest.random_port } let(:queue) { Queue.new } @@ -39,10 +40,10 @@ end let(:codec) { LogStash::Codecs::Multiline.new("pattern" => '\n', "what" => "previous") } it "clone the codec per connection" do expect(lumberjack.codec).to receive(:clone).once - expect(lumberjack).to receive(:invoke).and_throw(:msg) + expect(lumberjack).to receive(:invoke) { break } lumberjack.run(queue) end end end end