logstash-input-udp 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/logstash-input-udp.gemspec +1 -1
- data/spec/inputs/udp_spec.rb +4 -3
- data/spec/spec_helper.rb +2 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c69cbebeabe02c8f4a0e7fe20cfb1fea9345d387
|
4
|
+
data.tar.gz: 551ec08accad8b8c11a75269a63412907cc4536c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a87eb925a9131beac0020706e87af83decaf0cb6e8898ede617f42d5d96842537cab2b29a3ae0940886130ca70482a662b0daddaf94f8cc5199fef2f0744d8fa
|
7
|
+
data.tar.gz: 87de0fe87dc38cefced7c7c00b90a8929d54c0512c131fd6f660d56fb7b0865ca65a33bb1644e674e897ef1a749cef07c02339dcca79659abad56edaa17d9364
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 2.0.2
|
2
|
+
- Adapt the test style to be able to run within the context of the LS
|
3
|
+
core default plugins test (integration)
|
4
|
+
|
1
5
|
## 2.0.0
|
2
6
|
- Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
|
3
7
|
instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
|
data/logstash-input-udp.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-udp'
|
4
|
-
s.version = '2.0.
|
4
|
+
s.version = '2.0.2'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Read messages as events over the network via udp."
|
7
7
|
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"
|
data/spec/inputs/udp_spec.rb
CHANGED
@@ -8,8 +8,9 @@ describe LogStash::Inputs::Udp do
|
|
8
8
|
srand(RSpec.configuration.seed)
|
9
9
|
end
|
10
10
|
|
11
|
-
let(:
|
12
|
-
|
11
|
+
let!(:helper) { UdpHelpers.new }
|
12
|
+
let(:port) { rand(1024..65535) }
|
13
|
+
subject { LogStash::Plugin.lookup("input", "udp").new({ "port" => port }) }
|
13
14
|
|
14
15
|
after :each do
|
15
16
|
subject.close rescue nil
|
@@ -27,7 +28,7 @@ describe LogStash::Inputs::Udp do
|
|
27
28
|
let(:nevents) { 10 }
|
28
29
|
|
29
30
|
let(:events) do
|
30
|
-
input(subject, nevents) do
|
31
|
+
helper.input(subject, nevents) do
|
31
32
|
nevents.times do |i|
|
32
33
|
client.send("msg #{i}")
|
33
34
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -8,7 +8,7 @@ class LogStash::Inputs::Udp
|
|
8
8
|
attr_reader :udp
|
9
9
|
end
|
10
10
|
|
11
|
-
|
11
|
+
class UdpHelpers
|
12
12
|
|
13
13
|
def input(plugin, size, &block)
|
14
14
|
queue = Queue.new
|
@@ -20,7 +20,7 @@ module UdpHelpers
|
|
20
20
|
sleep 0.1 until (plugin.udp && !plugin.udp.closed?)
|
21
21
|
block.call
|
22
22
|
sleep 0.1 while queue.size != size
|
23
|
-
result =
|
23
|
+
result = size.times.inject([]) do |acc|
|
24
24
|
acc << queue.pop
|
25
25
|
end
|
26
26
|
plugin.do_stop
|
@@ -28,7 +28,3 @@ module UdpHelpers
|
|
28
28
|
end
|
29
29
|
|
30
30
|
end
|
31
|
-
|
32
|
-
RSpec.configure do |c|
|
33
|
-
c.include UdpHelpers
|
34
|
-
end
|