summaryrefslogtreecommitdiff
path: root/test/parallel/test-dgram-send-callback-buffer-length.js
Commit message (Collapse)AuthorAgeFilesLines
* test: add common.mustSucceedTobias Nießen2020-10-171-2/+1
| | | | | | PR-URL: https://github.com/nodejs/node/pull/35086 Reviewed-By: Ruy Adorno <ruyadorno@github.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* test: bind to 0 in dgram-send-callback-buffer-lengthArtur Vieira2017-05-221-1/+4
| | | | | | | | | | | | Remove common.PORT from test-dgram-send-callback-buffer-length to eliminate possibility that a dynamic port used in another test will collide with common.PORT. PR-URL: https://github.com/nodejs/node/pull/12943 Refs: https://github.com/nodejs/node/issues/12376 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <mhdawson@ibm.com>
* meta: restore original copyright headerJames M Snell2017-03-101-0/+21
| | | | | | | | | | | | | | | A prior io.js era commit inappropriately removed the original copyright statements from the source. This restores those in any files still remaining from that edit. Ref: https://github.com/nodejs/TSC/issues/174 Ref: https://github.com/nodejs/node/pull/10599 PR-URL: https://github.com/nodejs/node/pull/10155 Note: This PR was required, reviewed-by and approved by the Node.js Foundation Legal Committee and the TSC. There is no `Approved-By:` meta data.
* test: add error checking in callbackRich Trott2017-02-191-0/+1
| | | | | | | | | | | | Add assert.ifError() for test-dgram-send-callback-buffer-length. PR-URL: https://github.com/nodejs/node/pull/11446 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* test: remove arbitrary timerRich Trott2016-10-211-7/+2
| | | | | | | | | | | | `test-dgram-send-callback-buffer-length` was timing out (via the 200ms timeout in the code) on FreeBSD in CI. The 200ms timeout is arbitrary and not necessary. Remove it. PR-URL: https://github.com/nodejs/node/pull/9197 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* dgram: copy the list in sendMatteo Collina2016-05-261-14/+12
| | | | | | | | | | | | | | | | | This commit fix a possible crash situation in dgram send(). A crash is possible if an array is passed, and then altered after the send call, as the call to libuv is wrapped in process.nextTick(). It also avoid sending an empty array to libuv by allocating an empty buffer. It also does some cleanup inside send() to increase readability. It removes test flakyness by use common.mustCall and common.platformTimeout. Fixes situations were some events were not asserted to be emitted. Fixes: https://github.com/nodejs/node/issues/6616 PR-URL: https://github.com/nodejs/node/pull/6804 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* buffer: add .from(), .alloc() and .allocUnsafe()James M Snell2016-03-161-1/+1
| | | | | | | | | | | | | | | Several changes: * Soft-Deprecate Buffer() constructors * Add `Buffer.from()`, `Buffer.alloc()`, and `Buffer.allocUnsafe()` * Add `--zero-fill-buffers` command line option * Add byteOffset and length to `new Buffer(arrayBuffer)` constructor * buffer.fill('') previously had no effect, now zero-fills * Update the docs PR-URL: https://github.com/nodejs/node/pull/4682 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
* test: remove unused modulesRich Trott2016-01-011-2/+0
| | | | | | | | | | Many tests use require() to import modules that subsequently never gets used. This removes those imports and, in a few cases, removes other unused variables from tests. PR-URL: https://github.com/nodejs/node/pull/4475 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
* test: enable linting for testsRoman Reiss2015-05-191-5/+6
| | | | | | | | | | | | Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: https://github.com/nodejs/io.js/pull/1721 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* Remove excessive copyright/license boilerplateisaacs2015-01-121-22/+0
| | | | | | | The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
* test: split test in parallel/sequentialFedor Indutny2014-12-171-0/+49
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: https://github.com/iojs/io.js/pull/172 Fix: iojs/io.js#139