diff options
author | Evan Lucas <evanlucas@me.com> | 2016-10-19 19:27:08 -0500 |
---|---|---|
committer | Evan Lucas <evanlucas@me.com> | 2016-10-25 08:07:16 -0500 |
commit | 2a654e47282c8b2847422f2d4c444180f214ab5c (patch) | |
tree | 7f2c956eb4f3d3fd4ce582a2fdcc9a9eb0a31fe2 | |
parent | 63c47e7189f8c157b6ceedabc3c292f7e6585abf (diff) | |
download | node-new-2a654e47282c8b2847422f2d4c444180f214ab5c.tar.gz |
test: fix flaky test by removing timer
This fixes one of the tests that has been failing on CI on freebsd for
a bit by removing an unnecessary timer.
PR-URL: https://github.com/nodejs/node/pull/9199
Fixes: https://github.com/nodejs/node/issues/7929
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
-rw-r--r-- | test/parallel/test-dgram-send-callback-buffer.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/test/parallel/test-dgram-send-callback-buffer.js b/test/parallel/test-dgram-send-callback-buffer.js index e2966645d9..e0b2a581bf 100644 --- a/test/parallel/test-dgram-send-callback-buffer.js +++ b/test/parallel/test-dgram-send-callback-buffer.js @@ -9,14 +9,9 @@ const client = dgram.createSocket('udp4'); const buf = Buffer.allocUnsafe(256); const onMessage = common.mustCall(function(err, bytes) { - assert.strictEqual(err, null); - assert.equal(bytes, buf.length); - clearTimeout(timer); + assert.ifError(err); + assert.strictEqual(bytes, buf.length); client.close(); }); -const timer = setTimeout(function() { - throw new Error('Timeout'); -}, common.platformTimeout(200)); - client.send(buf, common.PORT, common.localhostIPv4, onMessage); |