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

feat: add timeout option for both install and test phase #769

Merged
merged 6 commits into from May 9, 2020
Merged

feat: add timeout option for both install and test phase #769

merged 6 commits into from May 9, 2020

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Nov 4, 2019

Checklist
  • npm test passes
  • tests are included
  • documentation is changed or added
  • contribution guidelines followed
    here

This is #740 without the changes to lookups. I have the same question @Zirro had over there though - where to add tests? Seems like a bunch of the options you can define in lookup.json are untested.

@SimenB SimenB mentioned this pull request Nov 4, 2019
4 tasks
@@ -73,8 +73,7 @@ module.exports = function commonArgs(app) {
.option('timeout', {
alias: 'o',
type: 'number',
description: 'Set timeout for npm install',
default: 1000 * 60 * 10
description: 'Set timeout for npm install'
Copy link
Member Author

Choose a reason for hiding this comment

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

we use it for test now - maybe a dedicated test timeout makes sense?

@codecov-io
Copy link

codecov-io commented Nov 4, 2019

Codecov Report

Merging #769 into master will decrease coverage by 0.32%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #769      +/-   ##
==========================================
- Coverage   96.27%   95.95%   -0.33%     
==========================================
  Files          30       30              
  Lines         887      889       +2     
==========================================
- Hits          854      853       -1     
- Misses         33       36       +3     
Impacted Files Coverage Δ
bin/citgm-all.js 92.00% <ø> (ø)
bin/citgm.js 100.00% <ø> (ø)
lib/common-args.js 100.00% <ø> (ø)
lib/grab-project.js 92.15% <ø> (ø)
lib/package-manager/install.js 95.12% <ø> (ø)
lib/lookup.js 96.15% <50.00%> (-1.22%) ⬇️
lib/package-manager/test.js 98.52% <100.00%> (ø)
lib/timeout.js 100.00% <100.00%> (ø)
lib/match-conditions.js 89.36% <0.00%> (-4.26%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a67edc7...5af84bb. Read the comment docs.

@SimenB
Copy link
Member Author

SimenB commented Apr 29, 2020

Would love to make some progress here as well - any feedback on it? 🙂

@SimenB
Copy link
Member Author

SimenB commented May 1, 2020

I've rebased now. Happy to add tests if I could get some guidance on how to best test this

@targos
Copy link
Member

targos commented May 1, 2020

I'm always lost with tests in this repo. I wouldn't be against landing this without new tests.

@SimenB
Copy link
Member Author

SimenB commented May 1, 2020

Feel free to merge 😃

@targos
Copy link
Member

targos commented May 1, 2020

I cannot merge a draft PR :p

@SimenB SimenB marked this pull request as ready for review May 1, 2020 21:02
@SimenB
Copy link
Member Author

SimenB commented May 2, 2020

It's not draft anymore 😀

README.md Outdated Show resolved Hide resolved
@SimenB
Copy link
Member Author

SimenB commented May 2, 2020

@targos I was a bit quick there, need to update the code as well. I'll get back to this later tonight

lib/lookup.js Outdated Show resolved Hide resolved
lib/package-manager/test.js Outdated Show resolved Hide resolved
@targos
Copy link
Member

targos commented May 9, 2020

ping @SimenB :)

Zirro and others added 3 commits May 9, 2020 12:44
Co-authored-by: Michaël Zasso <targos@protonmail.com>
@SimenB
Copy link
Member Author

SimenB commented May 9, 2020

@targos sorry, completely forgot. Made a search & replace pass now, PTAL 🙂

README.md Outdated Show resolved Hide resolved
@targos
Copy link
Member

targos commented May 9, 2020

I think we shouldn't rename everything to testTimeout though because the general option also applies to install.

@SimenB SimenB changed the title feat: add timeoutLength option feat: add timeout option for both install and test phase May 9, 2020
@SimenB
Copy link
Member Author

SimenB commented May 9, 2020

@targos what about now? I quite like it as it brings parity between option from lookup and CLI arg.

@targos
Copy link
Member

targos commented May 9, 2020

Looks good to me. Thanks, let's ship it!

@targos targos merged commit 260bea9 into nodejs:master May 9, 2020
@SimenB SimenB deleted the custom-timeout branch May 9, 2020 11:17
@SimenB
Copy link
Member Author

SimenB commented May 9, 2020

Yay!

@SimenB SimenB mentioned this pull request May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants