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: use safe-timers only large than interval && add tests #21

Merged
merged 1 commit into from
Jun 6, 2017

Conversation

atian25
Copy link
Member

@atian25 atian25 commented Jun 5, 2017

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

@atian25 atian25 requested a review from fengmk2 June 5, 2017 05:55
@mention-bot
Copy link

@atian25, thanks for your PR! By analyzing the history of the files in this pull request, we identified @dead-horse and @fengmk2 to be potential reviewers.

agent.js Outdated
@@ -106,15 +105,15 @@ function startCron(interval, listener) {
}

function safeTimeout(fn, delay, ...args) {
if (delay >= MAX_SAFE_TIME) {
if (delay >= safetimers.maxInterval) {
Copy link
Member

Choose a reason for hiding this comment

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

额,不应该是小于么?

Copy link
Member Author

Choose a reason for hiding this comment

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

-.-!!

Copy link
Member Author

Choose a reason for hiding this comment

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

果然是没有测试覆盖的肯定会有问题,我补下测试

Copy link
Member

Choose a reason for hiding this comment

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

... 逻辑全反了

@codecov
Copy link

codecov bot commented Jun 5, 2017

Codecov Report

Merging #21 into master will increase coverage by 1.78%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #21      +/-   ##
========================================
+ Coverage   98.21%   100%   +1.78%     
========================================
  Files           3      3              
  Lines         112    111       -1     
========================================
+ Hits          110    111       +1     
+ Misses          2      0       -2
Impacted Files Coverage Δ
agent.js 100% <100%> (+3.44%) ⬆️

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 da212ac...63a6e1d. Read the comment docs.

@atian25 atian25 changed the title chore: use safetimers max interval fix: use safe-timers only large than interval && add tests Jun 5, 2017
@atian25 atian25 force-pushed the exports branch 8 times, most recently from 5b8e487 to 5b27e8e Compare June 5, 2017 12:26
@atian25
Copy link
Member Author

atian25 commented Jun 6, 2017

@dead-horse 再看看,测试过了

@dead-horse dead-horse merged commit 9ba36c7 into master Jun 6, 2017
@dead-horse dead-horse deleted the exports branch June 6, 2017 01:47
@dead-horse
Copy link
Member

2.4.1

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.

4 participants