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

chore: optimize defer and test #1010

Merged
merged 2 commits into from
Jan 20, 2022
Merged

chore: optimize defer and test #1010

merged 2 commits into from
Jan 20, 2022

Conversation

jim3ma
Copy link
Member

@jim3ma jim3ma commented Jan 19, 2022

Signed-off-by: Jim Ma [email protected]

Description

  1. Optimize defer in peerTaskConductor.Done and peerTaskConductor.Fail.
  2. Fix concurrent test failed in runPeerTaskConductor

Related Issue

Motivation and Context

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist:

  • Code compiles correctly.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@jim3ma jim3ma requested a review from a team as a code owner January 19, 2022 07:43
@jim3ma jim3ma force-pushed the chore/optimize-defer-and-test branch from c71dd02 to 3681a53 Compare January 19, 2022 09:10
@codecov-commenter
Copy link

Codecov Report

Merging #1010 (734016f) into main (5083963) will decrease coverage by 0.04%.
The diff coverage is 55.17%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1010      +/-   ##
==========================================
- Coverage   45.60%   45.56%   -0.05%     
==========================================
  Files         128      128              
  Lines        9107     9122      +15     
==========================================
+ Hits         4153     4156       +3     
- Misses       4483     4493      +10     
- Partials      471      473       +2     
Flag Coverage Δ
Object-compatibility-e2etests ?
e2etests ?
unittests 45.56% <55.17%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
client/daemon/storage/storage_manager.go 19.20% <ø> (ø)
client/daemon/peer/peertask_conductor.go 56.72% <40.00%> (-0.63%) ⬇️
client/daemon/peer/peertask_manager.go 43.75% <66.66%> (+1.85%) ⬆️
client/daemon/peer/peertask_file.go 57.60% <100.00%> (ø)
client/daemon/peer/peertask_stream.go 65.41% <100.00%> (ø)
client/daemon/peer/piece_broker.go 81.48% <0.00%> (-3.71%) ⬇️

Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

@gaius-qi gaius-qi merged commit 432a58f into main Jan 20, 2022
@gaius-qi gaius-qi deleted the chore/optimize-defer-and-test branch January 20, 2022 06:35
gaius-qi pushed a commit that referenced this pull request Jun 28, 2023
* chore: optimize defer and test

Signed-off-by: Jim Ma <[email protected]>

* fix: random test failed

Signed-off-by: Jim Ma <[email protected]>
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