★ wanayoo — archive 1999 https://github.com/nodejs/node/pull/21949Nouvelle recherche | Portail wanayoo
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: fix unreliable test-fs-stat-bigint #21949

Closed
wants to merge 2 commits into from

Conversation

@samarthgulati
Copy link

@samarthgulati samarthgulati commented Jul 23, 2018

Remove side-effects between testcases by creating a new file everytime.

Fixes: #21948

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Remove side-effects between testcases by creating a new file everytime.

Fixes: nodejs#21948
Trott
Trott approved these changes Jul 23, 2018
@Trott
Copy link
Member

@Trott Trott commented Jul 23, 2018

}

function linkToFile(filename) {
const link = path.join(tmpdir.path, `symbolic-link-${testIndex}`);
Copy link
Member

@addaleax addaleax Jul 23, 2018

Should this maybe also increment the index?

Copy link
Member

@Trott Trott Jul 23, 2018 •

That wouldn't hurt but also isn't necessary?

Copy link
Member

@Trott Trott Jul 23, 2018

Maybe another fun option might be to change it from:

`symbolic-link-${testIndex}`

...to:

`${filename}-link`

Copy link
Member

@Trott Trott Jul 23, 2018

...which might make the whole function unnecessary? All calls to the function could be replaced with:

fs.symlinkSync(filename, `${filename}-link`);

Copy link
Author

@samarthgulati samarthgulati Jul 24, 2018

Incorporated the changes you suggested. I still have the link variable in there to keep the line width under limit.

@Trott
Copy link
Member

@Trott Trott commented Jul 24, 2018

@trivikr
Copy link
Member

@trivikr trivikr commented Jul 24, 2018

@samarthgulati Congratulations on your first PR to Node.js core! 🎉
Looks like user.email in git config is not the same as your email registered with Github. Either add currently used email ID to Github, or update your email ID as per the instructions here

lpinca
lpinca approved these changes Jul 25, 2018
Trott added a commit to Trott/io.js that referenced this issue Jul 25, 2018
Remove side-effects between testcases by creating a new file everytime.

Fixes: nodejs#21948
PR-URL: nodejs#21949
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@Trott
Copy link
Member

@Trott Trott commented Jul 25, 2018

Landed in 4d94bb2.

Thanks for the contribution! 🎉

(If you're interested in other possible contributions to Node.js but don't have a good idea of where to start looking, come ideas are posted at https://www.nodetodo.org/next-steps/.)

@Trott Trott closed this Jul 25, 2018
targos added a commit that referenced this issue Jul 26, 2018
Remove side-effects between testcases by creating a new file everytime.

Fixes: #21948
PR-URL: #21949
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@targos targos mentioned this pull request Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

6 participants