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: Added more validations to setEncoding #9997

Closed

Conversation

pauljlucas
Copy link
Contributor

Checklist
  • [x ] make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • [x ] commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change
  • Added more strict validations to properly test setEncoding

  • Changed all var usage to const or let

  • Changed assert.equal to assert.strictEqual

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 1, 2016
@imyller imyller added code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. tls Issues and PRs related to the tls subsystem. labels Dec 1, 2016
@gibfahn
Copy link
Member

gibfahn commented Dec 1, 2016

@bnoordhuis
Copy link
Member

Can you fix the lint errors?

- Added more strict validations to properly test setEncoding

- Changed all var usage to const or let

- Changed assert.equal to assert.strictEqual
@pauljlucas pauljlucas force-pushed the paul/updating-setencoding-test branch from 309a854 to 5066e27 Compare December 1, 2016 22:00
@pauljlucas
Copy link
Contributor Author

pauljlucas commented Dec 1, 2016

Hey @gibfahn and @bnoordhuis,

Figured out the issue and fixed. Looks like my comments went on too long :)

Let me know if you have anything else that you would like me to change and thanks again for the workshop today.

@gibfahn
Copy link
Member

gibfahn commented Dec 2, 2016

@pauljlucas
Copy link
Contributor Author

Hey @gibfahn

Just looked at the failed linux portion and am seeing that the test i modified passes:

ok 1078 parallel/test-tls-set-encoding
  ---
  duration_ms: 0.265
  ...

from CI console output: https://ci.nodejs.org/job/node-test-commit-linux/6374/nodes=ubuntu1604_docker_alpine34-64/console

Not sure if this is something on the code side or jenkins side, but if you have any ideas would appreciate you pointing me in the right direction to get this working. Thanks

@gibfahn
Copy link
Member

gibfahn commented Dec 2, 2016

@pauljlucas Looks like a flaky test. As the test you modified passed on all platforms, I'd say CI was successful.

We could rerun, but I don't think it's necessary.

@pauljlucas
Copy link
Contributor Author

Thanks for the clarification @gibfahn. I'm fine with whatever the standard is. Let me know if any clarifications are needed or if there is anything i need to do for getting the code reviewed.


// Confirming the buffer string is encoded in ASCII
// and thus does NOT match the UTF8 string
assert.notEqual(buffer, messageUtf8);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you use assert.notStrictEqual() here.

This is changing a notEqual test to notStrictEqual
as reference in pr: nodejs#9997
@pauljlucas
Copy link
Contributor Author

@cjihrig Change made in commit d421e32.

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

jasnell pushed a commit that referenced this pull request Dec 5, 2016
* Added more strict validations to properly test setEncoding
* Changed all var usage to const or let
* Changed assert.equal to assert.strictEqual

PR-URL: #9997
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell
Copy link
Member

jasnell commented Dec 5, 2016

Landed in 0c45959. Thank you for the PR and for participating in code-and-learn!

@jasnell jasnell closed this Dec 5, 2016
Fishrock123 pushed a commit that referenced this pull request Dec 6, 2016
* Added more strict validations to properly test setEncoding
* Changed all var usage to const or let
* Changed assert.equal to assert.strictEqual

PR-URL: #9997
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax pushed a commit to addaleax/node that referenced this pull request Dec 8, 2016
* Added more strict validations to properly test setEncoding
* Changed all var usage to const or let
* Changed assert.equal to assert.strictEqual

PR-URL: nodejs#9997
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
jmdarling pushed a commit to jmdarling/node that referenced this pull request Dec 8, 2016
* Added more strict validations to properly test setEncoding
* Changed all var usage to const or let
* Changed assert.equal to assert.strictEqual

PR-URL: nodejs#9997
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
* Added more strict validations to properly test setEncoding
* Changed all var usage to const or let
* Changed assert.equal to assert.strictEqual

PR-URL: #9997
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. test Issues and PRs related to the tests. tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants