-
Notifications
You must be signed in to change notification settings - Fork 30k
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
d9ed965
commit 2333cd3
Showing
2 changed files
with
21 additions
and
4 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'); | ||
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