-
Notifications
You must be signed in to change notification settings - Fork 492
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
TestRequestBlockBytesErrors: Various fixes #2928
TestRequestBlockBytesErrors: Various fixes #2928
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2928 +/- ##
==========================================
+ Coverage 47.27% 47.30% +0.02%
==========================================
Files 356 356
Lines 57239 57244 +5
==========================================
+ Hits 27062 27081 +19
+ Misses 27108 27100 -8
+ Partials 3069 3063 -6
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why the ledger need to be modfied. Wouldn't it be enough to have the wait group on the block service ? i.e. tsachiherman:tsachi/TestRequestBlockBytesErrors
Yes, wait group is sufficient to be on the block service, as long as the block service is closed before the ledger service, which is already the case. |
- Add waitgrop to ledger to wait before closing the ledger and blockQ when goroutines are using them. - In universalFetcher, return the error immediately in case of an error. - Proper closing of objects in TestRequestBlockBytesErrors, and more verbose error reporting.
8f230b0
to
b653bd2
Compare
Summary
The test TestRequestBlockBytesErrors has failed, and the reason is unidentifiable.
Various fixes are here, including more verbose error reporting to identify the issue when it occurs again.
The waitGroup is needed for the following situation:
in blockService.go listenForCatchupReq
When, immediately after calling
bq.handleCatchupReq
,BlockService.Stop()
is called,blockQueue
will benil
by the timeblockQueue.getEncodedBlockCert
is called.Test Plan
Test is enhanced.