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: report actual error code on failure #34134

Merged
merged 1 commit into from
Jul 3, 2020

Conversation

richardlau
Copy link
Member

Add a message to an assertion in parallel/test-dgram-error-message-address to
output the actual error code that doesn't match the allowed errors.

For some context I've been setting up IBM i CI machines to build Node.js on IBM i
and this test is failing. The change in this PR has helped diagnose how the test is
failing by revealing the actual error code.

Before:

    AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

      assert(allowed.includes(e.code))

After:

     AssertionError [ERR_ASSERTION]: 'Unknown system error -42' was not one of EADDRNOTAVAIL,EAFNOSUPPORT,EPROTONOSUPPORT.
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jun 30, 2020
@richardlau richardlau added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 30, 2020
@nodejs-github-bot
Copy link
Collaborator

Add a custom message to parallel/test-dgram-error-message-address so
that the actual error code that doesn't match the allowed errors is
output on assertion failure.

PR-URL: nodejs#34134
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
@richardlau
Copy link
Member Author

Landed in d08334a.

@richardlau richardlau merged commit d08334a into nodejs:master Jul 3, 2020
@richardlau richardlau deleted the whaterr branch July 3, 2020 14:53
MylesBorins pushed a commit that referenced this pull request Jul 14, 2020
Add a custom message to parallel/test-dgram-error-message-address so
that the actual error code that doesn't match the allowed errors is
output on assertion failure.

PR-URL: #34134
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jul 14, 2020
MylesBorins pushed a commit that referenced this pull request Jul 16, 2020
Add a custom message to parallel/test-dgram-error-message-address so
that the actual error code that doesn't match the allowed errors is
output on assertion failure.

PR-URL: #34134
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
Add a custom message to parallel/test-dgram-error-message-address so
that the actual error code that doesn't match the allowed errors is
output on assertion failure.

PR-URL: #34134
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
@codebytere codebytere mentioned this pull request Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants