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 global.PORT in dgram-cluster-test-1 #12491

Closed
wants to merge 2 commits into from

Conversation

zivkaziv
Copy link

@zivkaziv zivkaziv commented Apr 18, 2017

Hi,

This is my first attempt at a pull request here. Attempted to fix the issue referenced below.

Note that we pass the port from the cluster master to the workers via process.send.

Got some (administrative) help from @benjamingr #goodnessSquad

Refs: #12376

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

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Apr 18, 2017
@benjamingr
Copy link
Member

Copy link
Member

@benjamingr benjamingr left a comment

Choose a reason for hiding this comment

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

Changes LGTM.

@mscdex mscdex added cluster Issues and PRs related to the cluster subsystem. dgram Issues and PRs related to the dgram subsystem / UDP. labels Apr 18, 2017
@zivkaziv
Copy link
Author

zivkaziv commented Apr 18, 2017

Hey Benji,
I saw that the linux test failed.
I go over the logs and didn't find the error of this test.

Ok, I found the error log
https://ci.nodejs.org/job/node-test-commit-linux/nodes=fedora22/9212/console
But this error doesn't seems to be related to my commit,
Any idea what it is?


if (common.isWindows) {
common.skip('dgram clustering is currently not supported ' +
'on windows.');
'on windows.');
Copy link
Member

Choose a reason for hiding this comment

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

unrelated whitespace change?

Copy link
Author

Choose a reason for hiding this comment

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

I'm apologize, It's not related.

Copy link
Member

Choose a reason for hiding this comment

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

No worries. Thanks for taking the time to do this PR, and I hope the duplicate PR thing won't discourage you from doing more!

Copy link
Author

Choose a reason for hiding this comment

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

Thanks again, I'm definitely planning to do more..

Copy link
Contributor

Choose a reason for hiding this comment

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

הוא מתכוון שכדאי לתקן את זה 😉
אתה יכול לשנות את הקומיט האחרון ועשות פורס-פוש, או להוסיף עוד קומיט.

Copy link
Member

@benjamingr benjamingr Apr 19, 2017

Choose a reason for hiding this comment

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

@refack please stick to English in comments, thanks :) (so people are not excluded from the discussion). We have the Hebrew locale repo if you'd like to participate in translation and localization efforts.

Copy link
Author

Choose a reason for hiding this comment

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

I'm fixing it now..
Thanks

Copy link
Contributor

Choose a reason for hiding this comment

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

Hebrew re: #12491 (comment)

@Trott
Copy link
Member

Trott commented Apr 19, 2017

It looks like there's another PR that fixes the same issue that came in about 3 hours earlier. #12487

I'd leave this one open until in case that one doesn't land or this one is deemed superior for some reason.

As for the CI failure, it looks like a build issue unrelated to this change. I wouldn't worry about it.

@refack
Copy link
Contributor

refack commented Apr 19, 2017

ברוך הבא

@refack
Copy link
Contributor

refack commented Apr 19, 2017

[No secrets were shared in Hebrew 😉(all Googleable), just me screaching an itch to communicate in the old tongue]

@zivkaziv
Copy link
Author

I've uploaded a fix for the whitespaces change..
Thanks @Trott for the review and @refack with the clarification:)

#goodnessSquad

s.bind(0, () => {
const port = s.address().port;
s.close();
cb(null, port);
Copy link
Contributor

Choose a reason for hiding this comment

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

By the time this port is used by the test, there is a possibility that this would be assigned to someother process by the operating system.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or Am I missing something here?

Copy link
Author

Choose a reason for hiding this comment

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

This port assignment was relay on the suggestion of @benjamingr in
#12426 (comment)

Maybe the right solution is to close this port only in the end of the test.

@santigimeno
Copy link
Member

Closing as this was already fixed by #12487. Thanks for the contribution though!!

@santigimeno santigimeno closed this May 5, 2017
@zivkaziv
Copy link
Author

zivkaziv commented May 5, 2017

You welcome:) thank you..
I'll take another issue and continue soon

@refack
Copy link
Contributor

refack commented May 5, 2017

@zivkaziv sorry it "fell between the chairs" we do really appreciate your contribution. 🥇
As you probably know Open Source Software projects are fueled by the good will of the community 👍

@zivkaziv
Copy link
Author

zivkaziv commented May 5, 2017

Thanks:) I assumed that it wouldn't enter since another PR with this change submitted earlier then me:) but it was a good first commit for me...
The speed of changes here is amazing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cluster Issues and PRs related to the cluster subsystem. dgram Issues and PRs related to the dgram subsystem / UDP. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants