statsd-instrument 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/statsd/instrument/batched_udp_sink.rb +6 -1
- data/lib/statsd/instrument/version.rb +1 -1
- data/test/udp_sink_test.rb +26 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: feb99d0537663296eacb1c2f0c6d090f37430afc04d886b60a9aaf322f86a114
|
4
|
+
data.tar.gz: 0ed9a90c182d52d11a70490b78c369ba2ec9cdc1b4cf90c86d306199061d5dc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bba9e06ddabc9ec50fcc6586f53376d5c5a97ddd1745265d76130544b07ebe603375b964bb1d2ede8e32f03963d098df3bca774873a610cee20fad7df11d537c
|
7
|
+
data.tar.gz: b60faf4b9164f883592109a04e64ffb7aaa60972460c26545526c43ad16d2c3ed4a897d9a537a3b285cae4c6435dae8afd96a3303cf7aa2b818afceca65cf17b
|
data/CHANGELOG.md
CHANGED
data/test/udp_sink_test.rb
CHANGED
@@ -69,6 +69,32 @@ module UDPSinkTests
|
|
69
69
|
pass("Fork is not implemented on #{RUBY_PLATFORM}")
|
70
70
|
end
|
71
71
|
|
72
|
+
def test_sends_datagram_before_exit
|
73
|
+
udp_sink = build_sink(@host, @port)
|
74
|
+
fork do
|
75
|
+
udp_sink << "exiting:1|c"
|
76
|
+
Process.exit(0)
|
77
|
+
end
|
78
|
+
|
79
|
+
@receiver.wait_readable(1)
|
80
|
+
assert_equal("exiting:1|c", @receiver.recvfrom_nonblock(100).first)
|
81
|
+
rescue NotImplementedError
|
82
|
+
pass("Fork is not implemented on #{RUBY_PLATFORM}")
|
83
|
+
end
|
84
|
+
|
85
|
+
def test_sends_datagram_when_termed
|
86
|
+
udp_sink = build_sink(@host, @port)
|
87
|
+
fork do
|
88
|
+
udp_sink << "exiting:1|c"
|
89
|
+
Process.kill("TERM", Process.pid)
|
90
|
+
end
|
91
|
+
|
92
|
+
@receiver.wait_readable(1)
|
93
|
+
assert_equal("exiting:1|c", @receiver.recvfrom_nonblock(100).first)
|
94
|
+
rescue NotImplementedError
|
95
|
+
pass("Fork is not implemented on #{RUBY_PLATFORM}")
|
96
|
+
end
|
97
|
+
|
72
98
|
private
|
73
99
|
|
74
100
|
def build_sink(host = @host, port = @port)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: statsd-instrument
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesse Storimer
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-04-
|
13
|
+
date: 2021-04-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: concurrent-ruby
|