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

test: add tests for fsPromises.chown to increase coverage by shisama · Pull Request #20574 · nodejs/node · GitHub

/ node Public

test: add tests for fsPromises.chown to increase coverage - #20574

Closed
shisama wants to merge 4 commits into
nodejs:masterfrom
shisama:test-fs-promises-chown
Closed

test: add tests for fsPromises.chown to increase coverage#20574
shisama wants to merge 4 commits into
nodejs:masterfrom
shisama:test-fs-promises-chown

Conversation

shisama commented May 7, 2018

Copy link
Copy Markdown
Contributor

To increase test coverage for fs/promises, add tests for
methods chown(), filehandle.chown() and lchown().

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

nodejs-github-bot added the test Issues and PRs related to the tests. label May 7, 2018
ChALkeR added experimental Issues and PRs related to experimental features. fs Issues and PRs related to the fs subsystem / file system. labels May 8, 2018

Copy link
Copy Markdown
Member

BridgeAR added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. and removed author ready PRs that have at least one approval, no outstanding review comments, and a CI started. labels May 18, 2018
Comment thread test/parallel/test-fs-promises.js Outdated

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

process.getuid() and process.getgid() are not defined on Windows.

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

@cjihrig
Thank you for your review.
Fixed not to call the process.getuid() and process.getgid() on Windows.

Trott previously requested changes May 21, 2018

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

These tests seem to fail just about everywhere in CI...

shisama force-pushed the test-fs-promises-chown branch from e7b2fdf to b4fd185 Compare May 22, 2018 07:18

Trott commented May 22, 2018
edited
Loading

Copy link
Copy Markdown
Member

cjihrig dismissed Trott’s stale review May 22, 2018 18:59

because they said we could

Trott commented May 22, 2018

Copy link
Copy Markdown
Member

Rather than skipping on Windows, should we check that we get the right expected error when on Windows?

Trott previously requested changes May 22, 2018

Trott left a comment
edited
Loading

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

Tests still failing on most platforms:

15:19:05 not ok 584 parallel/test-fs-promises
15:19:05   ---
15:19:05   duration_ms: 0.171
15:19:05   severity: fail
15:19:05   exitcode: 1
15:19:05   stack: |-
15:19:05     (node:4855) ExperimentalWarning: The fs.promises API is experimental
15:19:05     /home/iojs/build/workspace/node-test-commit-linux/nodes/ubuntu1804-docker/test/common/index.js:798
15:19:05                  (err) => process.nextTick(() => { throw err; }));
15:19:05                                                    ^
15:19:05     
15:19:05     AssertionError [ERR_ASSERTION]: Code: ERR_METHOD_NOT_IMPLEMENTED; The provided arguments length (0) does not match the required ones (1).
15:19:05         at getMessage (internal/errors.js:223:3)
15:19:05         at new NodeError (internal/errors.js:156:13)
15:19:05         at lchown (internal/fs/promises.js:383:11)
15:19:05         at doTest (/home/iojs/build/workspace/node-test-commit-linux/nodes/ubuntu1804-docker/test/parallel/test-fs-promises.js:140:15)
15:19:05   ...

shisama changed the title test: add tests for fs/promises chown to increase coverage test: add tests for fsPromises.chown to increase coverage May 23, 2018

shisama commented May 23, 2018

Copy link
Copy Markdown
Contributor Author

@Trott
Thank you for your review.

I missed the doc indicates that the fsPromises.lchown is only implemented on macOS.
Doc: https://nodejs.org/api/fs.html#fs_fspromises_lchown_path_uid_gid

I fixed the method is only called on macOS.

Trott commented May 23, 2018
edited by BridgeAR
Loading

Copy link
Copy Markdown
Member

jasnell commented May 23, 2018

Copy link
Copy Markdown
Member

Lots of red in the new CI run. Some are flaky failures, some are build bot failures, some are potentially related.... CI seems rather iffy these days... running again: https://ci.nodejs.org/job/node-test-pull-request/15056/

shisama commented May 24, 2018

Copy link
Copy Markdown
Contributor Author

@jasnell
I think node-test-commit-linux failure is a flaky failure.
See #20907

Is the failure of node-test-commit-windows-fanned build bot failure?
This is happened on some PullRequest.

jasnell commented May 24, 2018

Copy link
Copy Markdown
Member

yeah, CI in general is in rough shape right now. Let's give it another day or so to see if we can get those issues figured out then give this another run.

mhdawson 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

Copy link
Copy Markdown
Member

@Trott PTAL. I just checked the CI and added a green check mark next to the CI that you started.

Trott commented May 31, 2018

Copy link
Copy Markdown
Member

CI: https://ci.nodejs.org/job/node-test-pull-request/15174/

If CI is green or yellow, feel free to clear my objection (although it looks like this needs a rebase and that will probably mean another CI after the rebase).

Trott commented May 31, 2018

Copy link
Copy Markdown
Member

(And again, I'd prefer that we don't skip the test on unsupported platforms but instead check that we get the expected error. This will help prevent us from making changes that introduce cryptic unhelpful errors by accident. But this is a suggestion and I'm certainly not going to block this on it. It's also something that can be added in a subsequent PR.)

shisama force-pushed the test-fs-promises-chown branch from 511e744 to 0e3a4ca Compare May 31, 2018 03:36
shisama force-pushed the test-fs-promises-chown branch 2 times, most recently from a41e746 to 8041fa3 Compare June 12, 2018 00:59
shisama force-pushed the test-fs-promises-chown branch from 8041fa3 to 012b2cc Compare June 21, 2018 15:56

shisama commented Jun 22, 2018

Copy link
Copy Markdown
Contributor Author

@Trott CI failure is that parallel/test-net-bytes-per-incoming-chunk-overhead is timeout. It is related to #21322 ?

Trott commented Jun 22, 2018

Copy link
Copy Markdown
Member

@Trott CI failure is that parallel/test-net-bytes-per-incoming-chunk-overhead is timeout. It is related to #21322 ?

@shisama Yes, it would seem to be.

CI: https://ci.nodejs.org/job/node-test-pull-request/15560/

Copy link
Copy Markdown
Contributor

@Trott @mhdawson @cjihrig @jasnell @BridgeAR please have another look. In particular @Trott who is currently blocking this PR. Thanks!

Comment thread test/parallel/test-fs-promises.js Outdated

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

If #21498 lands, this could become !common.isWindows.

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

Fixed it. Thanks.

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

@cjihrig PTAL Thanks.

Trott dismissed their stale review June 26, 2018 05:15

ci is green now, clearing my objection

shisama force-pushed the test-fs-promises-chown branch from f2d508b to 345ddc5 Compare July 1, 2018 14:12
TimothyGu added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Jul 30, 2018
shisama added 4 commits July 29, 2018 20:39
To increase test coverage for fs/promises, add tests for
methods chown(), filehandle.chown() and lchown().
Fix not to call `process.getuid()` and `process.getgid()` on Windows.
Add error tests for fsPromises.chown and FileHandle.chown on all
platforms.
TimothyGu force-pushed the test-fs-promises-chown branch from 345ddc5 to b1183ac Compare July 30, 2018 00:41

Copy link
Copy Markdown
Member

Rebased.

CI: https://ci.nodejs.org/job/node-test-pull-request/16070/

TimothyGu self-assigned this Jul 30, 2018

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member

Landed in a4ce449.

TimothyGu closed this Jul 30, 2018
TimothyGu removed the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Jul 30, 2018
TimothyGu pushed a commit that referenced this pull request Jul 30, 2018
To increase test coverage for fs/promises, add tests for
methods chown(), filehandle.chown() and lchown().

PR-URL: #20574
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
targos pushed a commit that referenced this pull request Jul 31, 2018
To increase test coverage for fs/promises, add tests for
methods chown(), filehandle.chown() and lchown().

PR-URL: #20574
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
targos mentioned this pull request Jul 31, 2018
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

experimental Issues and PRs related to experimental features. fs Issues and PRs related to the fs subsystem / file system. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants


Back | FazBrowse Home | New Git URL