statsd-client
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -48,2 +48,5 @@ var dgram = require('dgram'); | ||
//Make sure further errors do not propagate upwards | ||
this._socket.on("error", function () {}); | ||
// Cancel the running timer | ||
@@ -50,0 +53,0 @@ clearInterval(this._socketTimer); |
@@ -6,3 +6,3 @@ { | ||
"keywords": ["statsd", "client", "metrics", "udp"], | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"homepage": "https://github.com/msiebuhr/node-statsd-client", | ||
@@ -9,0 +9,0 @@ "bugs": "https://github.com/msiebuhr/node-statsd-client/issues", |
@@ -21,2 +21,3 @@ /* Test the Ephemeral socket | ||
it("Send 50 messages", function (done) { | ||
this.slow(500); | ||
for (var i = 0; i < 50; i += 1) { | ||
@@ -48,2 +49,15 @@ e.send('foobar'); | ||
it("Does not crash when many errors are emitted", function (done) { | ||
e._createSocket(function () { | ||
e._socket.emit('error'); | ||
e._socket.emit('error'); | ||
e._socket.emit('error'); | ||
setTimeout(function () { | ||
assert.isUndefined(e._socket); | ||
done(); | ||
}, 15); | ||
}); | ||
}); | ||
describe("Socket timeout", function () { | ||
@@ -63,5 +77,5 @@ var te; | ||
done(); | ||
}, 10); | ||
}, 15); | ||
}); | ||
}); | ||
}); |
@@ -79,2 +79,3 @@ var StatsDClient = require('../lib/statsd-client'), | ||
it('.timing("foo", new Date(-20ms)) ~→ "foo:20|ms"', function (done) { | ||
this.slow(100); | ||
var d = new Date(); | ||
@@ -81,0 +82,0 @@ setTimeout(function () { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26163
20
591