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 39e2fb6

Browse filesBrowse files
TrottMylesBorins
authored andcommitted
test: simplify common.PORT code
common.PORT is no longer used in parallelized tests and should not be. Remove code that accommodates parallelized tests. PR-URL: #17559 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
1 parent f7a1e39 commit 39e2fb6
Copy full SHA for 39e2fb6

File tree

Expand file treeCollapse file tree

2 files changed

+3
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-6
lines changed
Open diff view settings
Collapse file

‎test/common/index.js‎

Copy file name to clipboardExpand all lines: test/common/index.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ const noop = () => {};
3939
// Using a `.` prefixed name, which is the convention for "hidden" on POSIX,
4040
// gets tools to ignore it by default or by simple rules, especially eslint.
4141
let tmpDirName = '.tmp';
42-
// PORT should match the definition in test/testpy/__init__.py.
42+
4343
exports.PORT = +process.env.NODE_COMMON_PORT || 12346;
44+
4445
exports.isWindows = process.platform === 'win32';
4546
exports.isWOW64 = exports.isWindows &&
4647
(process.env.PROCESSOR_ARCHITEW6432 !== undefined);
@@ -162,7 +163,6 @@ exports.refreshTmpDir = function() {
162163
};
163164

164165
if (process.env.TEST_THREAD_ID) {
165-
exports.PORT += process.env.TEST_THREAD_ID * 100;
166166
tmpDirName += `.${process.env.TEST_THREAD_ID}`;
167167
}
168168
exports.tmpDir = path.join(testRoot, tmpDirName);
Collapse file

‎test/testpy/__init__.py‎

Copy file name to clipboardExpand all lines: test/testpy/__init__.py
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,7 @@ def GetCommand(self):
6161
source = open(self.file).read()
6262
flags_match = FLAGS_PATTERN.search(source)
6363
if flags_match:
64-
# PORT should match the definition in test/common/index.js.
65-
env = { 'PORT': int(os.getenv('NODE_COMMON_PORT', '12346')) }
66-
env['PORT'] += self.thread_id * 100
67-
flag = flags_match.group(1).strip().format(**env).split()
64+
flag = flags_match.group(1).strip().split()
6865
# The following block reads config.gypi to extract the v8_enable_inspector
6966
# value. This is done to check if the inspector is disabled in which case
7067
# the '--inspect' flag cannot be passed to the node process as it will

0 commit comments

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