logstash-input-beats 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dcc82edf516cc926764c9bf592b6b4240d2b250a
4
- data.tar.gz: afd96ca6287561a27ef83d1e5070785cc507da00
3
+ metadata.gz: 3394e299d7c7ecf132134ebed27de22b49d2bdc2
4
+ data.tar.gz: 3e92f0bdb6b00a5d28955673a647099dfe905d4e
5
5
  SHA512:
6
- metadata.gz: 9a4d8d3e817adaad0e49659c713ba864e2d32837ca39a751cb78d026bc71b215564048e7db7912934a551ff60c0aa2dc3ae52ae06b5f9ee4d4bd25814e4277f2
7
- data.tar.gz: 0416a16c50b648351929119370f8ea513ff2dfd1657afd47b7332e6ef3758c3381505ce639ba122790024a638272dd91e766f43fd0cd277143b32e66382f7578
6
+ metadata.gz: 3e2456b1703cf75ab2724fa61014d8dc0e1b56bdaf05045ab06bef319f0511a99de7627bb581c39e2296d9468c7f2399a770c2c59f115de6a7353b0cfca46605
7
+ data.tar.gz: 3ce48912d957e5539ba445b0580ef7e312f0d57b961a40247146fbf63d72778a2035bbb1ed25ceb0f3904b5ff4c06d7cb20373961a926d3a36161fcf7f503289
@@ -1,3 +1,6 @@
1
+ # 2.1.2
2
+ - Catch the `java.lang.InterruptedException` in the events broker
3
+ - Give a bit more time to the Thread to be started in the test #42
1
4
  # 2.1.1
2
5
  - Release a new version of the gem that doesn't included any other gems, 2.1.0 is yanked from rubygems
3
6
  # 2.1.0
@@ -217,9 +217,9 @@ class LogStash::Inputs::Beats < LogStash::Inputs::Base
217
217
  while !stop?
218
218
  @output_queue << @buffered_queue.take
219
219
  end
220
- rescue InterruptionException => e
220
+ rescue java.lang.InterruptedException => e
221
221
  # If we are shutting down without waiting the queue to unblock
222
- # we will get an `InterruptionException` in that context we will not log it.
222
+ # we will get an `java.lang.InterruptionException` in that context we will not log it.
223
223
  @logger.error("Beats input: bufferered queue exception", :exception => e) unless stop?
224
224
  rescue => e
225
225
  @logger.error("Beats input: unexpected exception", :exception => e)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "logstash-input-beats"
3
- s.version = "2.1.1"
3
+ s.version = "2.1.2"
4
4
  s.licenses = ["Apache License (2.0)"]
5
5
  s.summary = "Receive events using the lumberjack protocol."
6
6
  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
@@ -93,7 +93,9 @@ describe LogStash::Inputs::Beats do
93
93
  plugin.run(pipeline_queue)
94
94
  end
95
95
 
96
- sleep(0.1) until t.status == "run"
96
+ # Give a bit of time to the server to correctly
97
+ # start the thread.
98
+ sleep(1)
97
99
  end
98
100
 
99
101
  after :each do
@@ -107,12 +109,16 @@ describe LogStash::Inputs::Beats do
107
109
  end
108
110
 
109
111
  it "calls flush on the handler and tag the events" do
110
- expect(connection_handler).to receive(:accept) { raise LogStash::Inputs::Beats::InsertingToQueueTakeTooLong }
111
- expect(connection_handler).to receive(:flush).and_yield(LogStash::Event.new)
112
- plugin.handle_new_connection(connection)
113
-
114
- event = pipeline_queue.shift
115
- expect(event["tags"]).to include("beats_input_flushed_by_end_of_connection")
112
+ # try multiples times to make sure the
113
+ # thread containing the `#run` is correctly started.
114
+ try do
115
+ expect(connection_handler).to receive(:accept) { raise LogStash::Inputs::Beats::InsertingToQueueTakeTooLong }
116
+ expect(connection_handler).to receive(:flush).and_yield(LogStash::Event.new)
117
+ plugin.handle_new_connection(connection)
118
+
119
+ event = pipeline_queue.shift
120
+ expect(event["tags"]).to include("beats_input_flushed_by_end_of_connection")
121
+ end
116
122
  end
117
123
  end
118
124
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-beats
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic