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: fix flaky test-repl-sigint-nested-eval · nodejs/node@4283af4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • parallel.status
    • test-repl-sigint-nested-eval.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/parallel.status‎

Copy file name to clipboardExpand all lines: test/parallel/parallel.status
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ prefix parallel
55
# sample-test : PASS,FLAKY
66

77
[true] # This section applies to all platforms
8-
# https://github.com/nodejs/node/issues/41123
9-
test-repl-sigint-nested-eval: PASS, FLAKY
108
# https://github.com/nodejs/node/issues/43084
119
test-worker-http2-stream-terminate: PASS, FLAKY
1210

Collapse file

‎test/parallel/test-repl-sigint-nested-eval.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-repl-sigint-nested-eval.js
+7-6Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ if (!common.isMainThread)
1010
const assert = require('assert');
1111
const spawn = require('child_process').spawn;
1212

13-
process.env.REPL_TEST_PPID = process.pid;
1413
const child = spawn(process.execPath, [ '-i' ], {
15-
stdio: [null, null, 2]
14+
stdio: [null, null, 2, 'ipc']
1615
});
1716

1817
let stdout = '';
@@ -22,17 +21,19 @@ child.stdout.on('data', function(c) {
2221
});
2322

2423
child.stdout.once('data', common.mustCall(() => {
25-
process.on('SIGUSR2', common.mustCall(() => {
24+
child.on('message', common.mustCall((msg) => {
25+
assert.strictEqual(msg, 'repl is busy');
2626
process.kill(child.pid, 'SIGINT');
2727
child.stdout.once('data', common.mustCall(() => {
2828
// Make sure REPL still works.
2929
child.stdin.end('"foobar"\n');
3030
}));
3131
}));
3232

33-
child.stdin.write('process.kill(+process.env.REPL_TEST_PPID, "SIGUSR2");' +
34-
'vm.runInThisContext("while(true){}", ' +
35-
'{ breakOnSigint: true });\n');
33+
child.stdin.write(
34+
'vm.runInThisContext("process.send(\'repl is busy\'); while(true){}", ' +
35+
'{ breakOnSigint: true });\n'
36+
);
3637
}));
3738

3839
child.on('close', function(code) {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — 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.