FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: changed test1 of test-vm-timeout.js so that entire error message would be matched by moe-dizzle · Pull Request #11590 · nodejs/node · GitHub

/ node Public

test: changed test1 of test-vm-timeout.js so that entire error message would be matched - #11590

Closed
moe-dizzle wants to merge 3 commits into
nodejs:masterfrom
moe-dizzle:master
Closed

test: changed test1 of test-vm-timeout.js so that entire error message would be matched#11590
moe-dizzle wants to merge 3 commits into
nodejs:masterfrom
moe-dizzle:master

Conversation

Copy link
Copy Markdown
Contributor

Before test 1 of test-vm-timeout.js would match any error, now it looks specifically for the error message "Script execution timed out."

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

…e would be matched

Before test 1 of test-vm-timeout.js would match any error,
now it looks specifically for the error message "Script execution timed out."
nodejs-github-bot added the test Issues and PRs related to the tests. label Feb 27, 2017
mscdex added the vm Issues and PRs related to the vm subsystem. label Feb 27, 2017
Comment thread test/parallel/test-vm-timeout.js Outdated
// Test 1: Timeout of 100ms executing endless loop
assert.throws(function() {
vm.runInThisContext('while(true) {}', { timeout: 100 });
}, function(err) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think using a regexp as the second argument would be more succinct: /^Error: Script execution timed out\.$/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Haha I agree with you before when I tried /^Script execution timed out.$/ it didn't work, so I did the above approached. I didn't realize that "Error: " was included also. Awesome I will correct it!

Trott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Trott commented Feb 27, 2017

Copy link
Copy Markdown
Member

mscdex commented Feb 27, 2017

Copy link
Copy Markdown
Contributor

LGTM

addaleax commented Mar 5, 2017

Copy link
Copy Markdown
Member

Landed in 94d1c8d, thanks for the PR!

addaleax closed this Mar 5, 2017
addaleax pushed a commit that referenced this pull request Mar 5, 2017
test: changed test1 of test-vm-timeout.js so that entire error message
would be matched in assert.throw.

Before test 1 of test-vm-timeout.js would match any error,
now it looks specifically for the error message
"Script execution timed out."

PR-URL: #11590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
addaleax pushed a commit that referenced this pull request Mar 5, 2017
test: changed test1 of test-vm-timeout.js so that entire error message
would be matched in assert.throw.

Before test 1 of test-vm-timeout.js would match any error,
now it looks specifically for the error message
"Script execution timed out."

PR-URL: #11590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
evanlucas mentioned this pull request Mar 8, 2017
MylesBorins pushed a commit that referenced this pull request Apr 17, 2017
test: changed test1 of test-vm-timeout.js so that entire error message
would be matched in assert.throw.

Before test 1 of test-vm-timeout.js would match any error,
now it looks specifically for the error message
"Script execution timed out."

PR-URL: #11590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this pull request Apr 19, 2017
test: changed test1 of test-vm-timeout.js so that entire error message
would be matched in assert.throw.

Before test 1 of test-vm-timeout.js would match any error,
now it looks specifically for the error message
"Script execution timed out."

PR-URL: #11590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins mentioned this pull request Apr 19, 2017
andrew749 pushed a commit to michielbaird/node that referenced this pull request Jul 19, 2017
test: changed test1 of test-vm-timeout.js so that entire error message
would be matched in assert.throw.

Before test 1 of test-vm-timeout.js would match any error,
now it looks specifically for the error message
"Script execution timed out."

PR-URL: nodejs/node#11590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Issues and PRs related to the tests. vm Issues and PRs related to the vm subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants


Back | FazBrowse Home | New Git URL