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

go/e2e/queries: correctly ignore UnexpectedEOF errors #3372

Merged
merged 1 commit into from
Oct 5, 2020

Conversation

ptrus
Copy link
Member

@ptrus ptrus commented Oct 5, 2020

Working fix from: #3302 , now with tests

@codecov
Copy link

codecov bot commented Oct 5, 2020

Codecov Report

Merging #3372 into master will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3372      +/-   ##
==========================================
+ Coverage   65.68%   65.72%   +0.03%     
==========================================
  Files         371      371              
  Lines       33187    33187              
==========================================
+ Hits        21799    21811      +12     
+ Misses       8151     8141      -10     
+ Partials     3237     3235       -2     
Impacted Files Coverage Δ
go/consensus/tendermint/api/errors.go 90.00% <0.00%> (-10.00%) ⬇️
go/consensus/tendermint/abci/state/state.go 54.54% <0.00%> (-9.10%) ⬇️
go/consensus/tendermint/epochtime/epochtime.go 85.18% <0.00%> (-7.41%) ⬇️
go/runtime/tagindexer/tagindexer.go 66.27% <0.00%> (-4.66%) ⬇️
go/storage/api/root_cache.go 78.33% <0.00%> (-3.34%) ⬇️
go/storage/mkvs/iterator.go 80.57% <0.00%> (-2.88%) ⬇️
go/runtime/transaction/transaction.go 72.36% <0.00%> (-2.64%) ⬇️
go/consensus/api/grpc.go 64.92% <0.00%> (-2.47%) ⬇️
go/storage/database/database.go 68.23% <0.00%> (-2.36%) ⬇️
go/storage/mkvs/cache.go 78.40% <0.00%> (-1.88%) ⬇️
... and 26 more

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 4c7b797...fdc6c82. Read the comment docs.

if status.Err() == io.ErrUnexpectedEOF {
if st := cmnGrpc.GetErrorStatus(err); st != nil {
s, _ := status.FromError(io.ErrUnexpectedEOF)
if st.Err().Error() == s.Err().Error() {
Copy link
Member

Choose a reason for hiding this comment

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

Ugh this seems awkward.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, unfortunately i didn't find a nicer way of doing this (the alternative would be directly matching on string - well which is kinda close to what this is doing, but at least here there's no hardcoded strings here :P)

@ptrus ptrus force-pushed the ptrus/fix/workload-queries-eof branch from d48be06 to fdc6c82 Compare October 5, 2020 12:40
@ptrus ptrus merged commit d8b8bee into master Oct 5, 2020
@ptrus ptrus deleted the ptrus/fix/workload-queries-eof branch October 5, 2020 13:01
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