Skip to content

Commit

Permalink
test: remove flag for test-addon-uv-handle-leak
Browse files Browse the repository at this point in the history
test-addon-uv-handle-leak only requires worker_threads for the
subprocess which it explicitly calls with --experimental-worker. The
main test itself does not need it. Remove Flags: comment and move
loading of worker_threads into subprocess-only logic.

PR-URL: #25327
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Trott authored and addaleax committed Jan 8, 2019
1 parent 523872b commit 456f76a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/abort/test-addon-uv-handle-leak.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
// Flags: --experimental-worker
'use strict';
const common = require('../common');
const assert = require('assert');
const fs = require('fs');
const path = require('path');
const cp = require('child_process');
const { Worker } = require('worker_threads');
const { spawnSync } = require('child_process');

// This is a sibling test to test/addons/uv-handle-leak.
Expand All @@ -19,6 +17,8 @@ if (!fs.existsSync(bindingPath))

if (process.argv[2] === 'child') {

const { Worker } = require('worker_threads');

// The worker thread loads and then unloads `bindingPath`. Because of this the
// symbols in `bindingPath` are lost when the worker thread quits, but the
// number of open handles in the worker thread's event loop is assessed in the
Expand Down

0 comments on commit 456f76a

Please sign in to comment.