-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: increase dgram ref()/unref() coverage
This commit completes code coverage for dgram's Socket#ref() and Socket#unref() methods. PR-URL: #11240 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
- Loading branch information
1 parent
c7257e7
commit b29165f
Showing
2 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
'use strict'; | ||
require('../common'); | ||
var dgram = require('dgram'); | ||
const common = require('../common'); | ||
const dgram = require('dgram'); | ||
|
||
// should not hang, see #1282 | ||
dgram.createSocket('udp4'); | ||
dgram.createSocket('udp6'); | ||
|
||
{ | ||
// Test the case of ref()'ing a socket with no handle. | ||
const s = dgram.createSocket('udp4'); | ||
|
||
s.close(common.mustCall(() => s.ref())); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters