statsd-instrument 2.3.0.beta5 → 2.3.0.beta6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -0
- data/lib/statsd/instrument/backends/udp_backend.rb +1 -0
- data/lib/statsd/instrument/version.rb +1 -1
- data/test/udp_backend_test.rb +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 992aa50ef5d76e907dd2932f9f7cc7f50bbd073b
|
4
|
+
data.tar.gz: 136242c6b8359a006db090ae6108d0f8a8d630a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2809a4595b84f43693bb32baaa3eb5a4b05899d1be57e2090def3f3758159a9a9be49117e8ae5a53f178003930d692bb50a20a0a5f133e5d8992c5ab97830899
|
7
|
+
data.tar.gz: f098309c9a9755d4b6c1b455cc0e63312d077ca096aebdc8424203fd04e00892dda9bb500de6ff1dcecd3b0356e83893dd720c6964ed58ab78672bb6b3a79d1c
|
data/CHANGELOG.md
CHANGED
@@ -146,6 +146,7 @@ module StatsD::Instrument::Backends
|
|
146
146
|
socket.send(command, 0) > 0
|
147
147
|
rescue SocketError, IOError, SystemCallError, Errno::ECONNREFUSED => e
|
148
148
|
StatsD.logger.error "[StatsD] #{e.class.name}: #{e.message}"
|
149
|
+
invalidate_socket
|
149
150
|
end
|
150
151
|
|
151
152
|
def invalidate_socket
|
data/test/udp_backend_test.rb
CHANGED
@@ -207,4 +207,17 @@ class UDPBackendTest < Minitest::Test
|
|
207
207
|
|
208
208
|
assert $?.success?, 'socket did not write on exit'
|
209
209
|
end
|
210
|
+
|
211
|
+
def test_socket_error_should_invalidate_socket
|
212
|
+
seq = sequence('fail_then_succeed')
|
213
|
+
|
214
|
+
@socket.expects(:connect).with('localhost', 8125)
|
215
|
+
@socket.expects(:send).raises(Errno::EDESTADDRREQ).in_sequence(seq)
|
216
|
+
|
217
|
+
@socket.expects(:send).returns(1).in_sequence(seq)
|
218
|
+
@logger.expects(:error)
|
219
|
+
|
220
|
+
StatsD.increment('fail')
|
221
|
+
StatsD.increment('succeed')
|
222
|
+
end
|
210
223
|
end
|
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: 2.3.0.
|
4
|
+
version: 2.3.0.beta6
|
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: 2018-
|
13
|
+
date: 2018-08-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|