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: update setTimeout on file test/internet/test-net-connect-unref.js to use common.platformTimeout #21969

Closed
wants to merge 3 commits into from

Conversation

conectado
Copy link
Contributor

Hi!

This is my first PR 😄 I'm sorry if I make any mistake.

This commit updates the time used on the timeOut function to confonform to the recomendation given by the guide on writing tests.

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

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jul 25, 2018
@Trott
Copy link
Member

Trott commented Jul 25, 2018

Even better IMO would be to remove the setTimeout() line entirely. The test will timeout via the tools/test.py wrapper if it ever stops working.

@Trott
Copy link
Member

Trott commented Jul 25, 2018

Also: Welcome @conectado! Thanks for the pull request!

@conectado
Copy link
Contributor Author

conectado commented Jul 25, 2018

@Trott First and foremost thanks for the feedback!

I've started reading the tools/test.py wrapper, it's a complex file so I'm still trying to understand it. But for what I've gathered isn't there any chance that the tests are run with --timeout=None?

Edit: I've continued reading that file, and found out that on line 1440 all arguments are converted to int therefore one could never set --timeout=None. Please correct me if I'm wrong. Meanwhile I'm going to update the PR.

Changes the time used by the last line of the file to normalize the timeout
by using the common library.
Removes the setTimeout since if the test were to fail it would time out
due to the tools/test.py wrapper
@Trott
Copy link
Member

Trott commented Jul 25, 2018

@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 25, 2018
@conectado
Copy link
Contributor Author

I updated the PR, since the constant TIMEOUT has been left unused I removed it.

Copy link
Contributor

@maclover7 maclover7 left a comment

Choose a reason for hiding this comment

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

LGTM and welcome!

@Trott
Copy link
Member

Trott commented Jul 26, 2018

@Trott Trott added the fast-track PRs that do not need to wait for 48 hours to land. label Jul 26, 2018
@Trott
Copy link
Member

Trott commented Jul 26, 2018

👍 here to fast-track.

@Trott
Copy link
Member

Trott commented Jul 26, 2018

Landed in 586a7a4.

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, some ideas are posted at https://www.nodetodo.org/next-steps/.)

@Trott Trott closed this Jul 26, 2018
@richardlau
Copy link
Member

Landed in 586a7a4.

@Trott Did this actually land? I don't see it on the master branch in the GitHub web UI.

Trott pushed a commit to Trott/io.js that referenced this pull request Jul 26, 2018
Removes the setTimeout since if the test were to fail it would time out
due to the tools/test.py wrapper

PR-URL: nodejs#21969
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@Trott
Copy link
Member

Trott commented Jul 26, 2018

@Trott Did this actually land? I don't see it on the master branch in the GitHub web UI.

@richardlau Ugh, I forgot to push it. It's pushed now. (Thanks!)

@Trott
Copy link
Member

Trott commented Jul 26, 2018

Landed in 586a7a4.

@conectado
Copy link
Contributor Author

Thanks everyone!!

targos pushed a commit that referenced this pull request Jul 31, 2018
Removes the setTimeout since if the test were to fail it would time out
due to the tools/test.py wrapper

PR-URL: #21969
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@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
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. fast-track PRs that do not need to wait for 48 hours to land. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants