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

fix(cpuUsageThrottle): support breaking change in pidusage module #1762

Merged
merged 1 commit into from Mar 18, 2019

Conversation

retrohacker
Copy link
Member

@retrohacker retrohacker commented Mar 18, 2019

A commit semver major upgraded the pidusage module.

https://github.com/restify/node-restify/pull/1755/files#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R109

The cpuUsageThrottle tests proxyquired out the entire module, preventing them from failing even though the module changed it's API.

var cpuUsageThrottle = proxyquire('../../lib/plugins/cpuUsageThrottle.js', {
pidusage: {
stat: function(pid, cb) {
return cb(null, { cpu: CPU });
}
}
});

This PR:

  • Updates the plugin to use the new API for the pidusage module
  • Adds a test which validates the API for the pidusage module

@retrohacker retrohacker requested review from rajatkumar, DonutEspresso and hekike and removed request for rajatkumar March 18, 2019 19:36
Copy link
Member

@rajatkumar rajatkumar left a comment

Choose a reason for hiding this comment

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

Thanks for identifying this!

@retrohacker retrohacker merged commit 7460064 into master Mar 18, 2019
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

2 participants