Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c0a42bc

Browse filesBrowse files
santigimenoMyles Borins
authored andcommitted
test: verify IPC messages are emitted on next tick
The test in this commit runs correctly if IPC messages are properly consumed and emitted. Otherwise, the test times out. Fixes: #6561 PR-URL: #6909 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 0b8124f commit c0a42bc
Copy full SHA for c0a42bc

File tree

Expand file treeCollapse file tree

1 file changed

+23
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+23
-0
lines changed
Open diff view settings
Collapse file
+23Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
'use strict';
2+
const common = require('../common');
3+
const http = require('http');
4+
const cluster = require('cluster');
5+
6+
cluster.schedulingPolicy = cluster.SCHED_RR;
7+
8+
const server = http.createServer();
9+
10+
if (cluster.isMaster) {
11+
server.listen(common.PORT);
12+
const worker = cluster.fork();
13+
worker.on('exit', common.mustCall(() => {
14+
server.close();
15+
}));
16+
} else {
17+
process.on('uncaughtException', common.mustCall((e) => {}));
18+
server.listen(common.PORT);
19+
server.on('error', common.mustCall((e) => {
20+
cluster.worker.disconnect();
21+
throw e;
22+
}));
23+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.