GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: cover source-specific membership on closed sockets · nodejs/node@f5eb0d8

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-dgram-membership.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-dgram-membership.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-dgram-membership.js
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@ const setup = dgram.createSocket.bind(dgram, { type: 'udp4', reuseAddr: true });
3535
}));
3636
}
3737

38+
// Source-specific membership methods on closed sockets should throw.
39+
for (const method of ['addSourceSpecificMembership', 'dropSourceSpecificMembership']) {
40+
const socket = setup();
41+
socket.close(common.mustCall(() => {
42+
assert.throws(() => {
43+
socket[method]('127.0.0.1', multicastAddress);
44+
}, {
45+
code: 'ERR_SOCKET_DGRAM_NOT_RUNNING',
46+
name: 'Error',
47+
message: 'Not running'
48+
});
49+
}));
50+
}
51+
3852
// addMembership() with no argument should throw
3953
{
4054
const socket = setup();

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.