summaryrefslogtreecommitdiff
path: root/test/parallel/test-dgram-send-callback-recursive.js
AgeCommit message (Collapse)Author
2019-10-05dgram: use `uv_udp_try_send()`Anna Henningsen
This improves dgram performance by avoiding unnecessary async operations. One issue with this commit is that it seems hard to actually create conditions under which the fallback path to the async case is actually taken, for all supported OS, so an internal CLI option is used for testing that path. Another caveat is that the lack of an async operation means that there are slight timing differences (essentially `nextTick()` rather than `setImmediate()` for the send callback). PR-URL: https://github.com/nodejs/node/pull/29832 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-11-19test: replace anonymous closure function with arrow functionKunda Sunil Kumar
PR-URL: https://github.com/nodejs/node/pull/24435 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-10-12test: improve assertion message in dgram testShakeel Mohamed
PR-URL: https://github.com/nodejs/node/pull/16121 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2016-12-06test: changed assert.Equal to asset.strictEqualPaul Chin
test-dgram-send-callback-recursive.js PR-URL: https://github.com/nodejs/node/pull/9973 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-06-10test: use random ports where possibleBrian White
This helps to prevent issues where a failed test can keep a bound socket open long enough to cause other tests to fail with EADDRINUSE because the same port number is used. PR-URL: https://github.com/nodejs/node/pull/7045 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
2016-02-26test: refactor test-dgram-send-callback-recursiveSantiago Gimeno
Just send 10 messages recursively and check that the send calls are asynchronous by asserting that a `setImmediate` callback has been called in-between. It avoids a race condition in the test when the recursive limit is reached without having received at least 10 messages. Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: https://github.com/nodejs/node/pull/5079
2015-06-03test: loosen condition to detect infinite loopYosuke Furukawa
PR-URL: https://github.com/nodejs/io.js/pull/1857 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-05-13test: fix infinite loop detectionYosuke Furukawa
Fixes: https://github.com/iojs/io.js/issues/1675 PR-URL: https://github.com/iojs/io.js/pull/1681 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-05-10dgram: call send callback asynchronouslyYosuke Furukawa
dgram#send callback was changed synchronously. The PR-URL is here https://github.com/joyent/libuv/pull/1358 This commit is temporary fix until libuv issue is resolved. https://github.com/libuv/libuv/issues/301 PR-URL: https://github.com/iojs/io.js/pull/1313 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Trevor Norris <trev.norris@gmail.com>