Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: changed test2 & test3 of test-vm-timeout.js #13453

Closed
wants to merge 1 commit into from

Conversation

aniketshukla
Copy link
Contributor

@aniketshukla aniketshukla commented Jun 4, 2017

Changed test2 of test-vm-timeout.js so that entire error message
would be matched in assert.throw.
Before test 2 of test-vm-timeout.js would match any RangeError,
now it looks specifically for the error message
"RangeError: timeout must be a positive number"

Changed test 3 of test-vm-timeout.js so that entire error message
would be matched in assert.throw.
Before test 3 of test-vm-timeout.js would match any RangeError,
now it looks specifically for the error message
"RangeError: timeout must be a positive number"

Ref: #13454

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

test,vm

test: changed test2 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 2 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"

test: changed test 3 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 3 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jun 4, 2017
@vsemozhetbyt vsemozhetbyt added the vm Issues and PRs related to the vm subsystem. label Jun 4, 2017
@vsemozhetbyt
Copy link
Contributor

@refack
Copy link
Contributor

refack commented Jun 4, 2017

@aniketshukla Welcome, and thank you very much for the contribution 🥇
I've "gently" edited you original comment to make it more conformant with our template (you actually have supplied a test, and the affected subsystems are: test,vm)

Copy link
Contributor

@vsemozhetbyt vsemozhetbyt left a comment

Choose a reason for hiding this comment

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

Тhank you!

@aniketshukla
Copy link
Contributor Author

@refack @vsemozhetbyt Thank you !

Copy link
Member

@tniessen tniessen left a comment

Choose a reason for hiding this comment

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

Please choose a more specific commit message. The first line should start with test,vm: and say something useful, e.g. test,vm: restrict allowed RangeErrors for timeout. Additionally, the next paragraphs can be shortened significantly.

@addaleax
Copy link
Member

addaleax commented Jun 4, 2017

The first line should start with test,vm:

That’s really not customary for test-only changes; I think we mostly do that kind of format for changes that are test-heavy but also have changes in lib/ or src/. I think the commit message is fine as it is.

@refack
Copy link
Contributor

refack commented Jun 4, 2017

test,vm: restrict allowed RangeErrors for timeout

I would suggest test: validate full error messages
INHO you can remove everything else. We'll add the (new) reference to #13454 that supplies the motivation, and the filename is automatically added by git to the full commit metadata.

@tniessen
Copy link
Member

tniessen commented Jun 4, 2017

@addaleax Okay, my bad, I thought we included all affected subsystems in the commit message. IMHO "changed test2 & test3 of test-vm-timeout.js" is not a helpful commit message.

@refack
Copy link
Contributor

refack commented Jun 4, 2017

Okay, my bad, I interpreted, I thought we included all affected subsystems in the commit message.

INHO It's good you voice your opinion!
Anyway it's a judgment call, in my POV test,vm would be better when a new test is added that tests vm. IMHO this change is more of an improvement to the test suite 🤔

IMHO "changed test2 & test3 of test-vm-timeout.js" is not a helpful commit message.
👍

@refack
Copy link
Contributor

refack commented Jun 4, 2017

@tniessen personally I give more "assertive" comment to @nodejs/collaborators members then to other users (IMHO @addaleax does too), it doesn't mean we are always right, and it's usually not meant as criticism (unless explicitly written so), and is never ever personal! You should take it as pointer to (undocumented) more common practices.

@tniessen
Copy link
Member

tniessen commented Jun 4, 2017

@refack It's okay, no offense taken :) I see that including vm in the commit message is not necessary, it might actually be confusing as no actual changes were made to the vm subsystem, but I still hold up my opinion about the commit message. IMO the first line should at least attempt to explain or summarize what was done :)

If we agree on a different commit message, I can change it while merging this (unless someone else plans to do that). I am fine with @refack's suggestion (test: validate full error messages) considering your explanation.

@refack
Copy link
Contributor

refack commented Jun 4, 2017

Failure on test/windows-fanned is unrelated. Maybe a new flake.

@refack
Copy link
Contributor

refack commented Jun 4, 2017

@refack refack self-assigned this Jun 4, 2017
refack pushed a commit to refack/node that referenced this pull request Jun 7, 2017
test: changed test2 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 2 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"

test: changed test 3 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 3 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"

PR-URL: nodejs#13453
Refs: nodejs#13454
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
@refack
Copy link
Contributor

refack commented Jun 7, 2017

Landed in 12e39d6

@refack refack closed this Jun 7, 2017
@refack
Copy link
Contributor

refack commented Jun 7, 2017

Extra post-land sanity of master: https://ci.nodejs.org/job/node-test-commit-linuxone/6445/

jasnell pushed a commit that referenced this pull request Jun 7, 2017
test: changed test2 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 2 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"

test: changed test 3 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 3 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"

PR-URL: #13453
Refs: #13454
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
@gibfahn gibfahn mentioned this pull request Jun 15, 2017
3 tasks
MylesBorins pushed a commit that referenced this pull request Jul 17, 2017
test: changed test2 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 2 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"

test: changed test 3 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 3 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"

PR-URL: #13453
Refs: #13454
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
@MylesBorins MylesBorins mentioned this pull request Jul 18, 2017
@refack refack removed their assignment Oct 20, 2018
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.

10 participants