Skip to content

Commit

Permalink
lib,test: parameterize worker resource tests
Browse files Browse the repository at this point in the history
Based on the new way of propagating worker initialization
failures, modify the tests so as to get specialized
error messages.
  • Loading branch information
HarshithaKP committed Feb 17, 2020
1 parent eee4378 commit a214d9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ E('ERR_WORKER_INVALID_EXEC_ARGV', (errors, msg = 'invalid execArgv flags') =>
`Initiated Worker with ${msg}: ${errors.join(', ')}`,
Error);
E('ERR_WORKER_NOT_RUNNING', 'Worker instance not running', Error);
E('ERR_WORKER_OUT_OF_MEMORY', 'Worker terminated due to reaching memory limit',
E('ERR_WORKER_OUT_OF_MEMORY', 'Worker terminated due to reaching memory limit: %s',
Error);
E('ERR_WORKER_PATH',
'The worker script filename must be an absolute path or a relative ' +
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-worker-resource-limits.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (!process.env.HAS_STARTED_WORKER) {
}));
w.on('error', common.expectsError({
code: 'ERR_WORKER_OUT_OF_MEMORY',
message: 'Worker terminated due to reaching memory limit'
message: 'Worker terminated due to reaching memory limit: JS heap Out of Memory'
}));
return;
}
Expand Down

0 comments on commit a214d9c

Please sign in to comment.