Conversation
| expect(storageRpcMock.writeWithResponse( | ||
| eq(UPLOAD_ID), | ||
| capture(capturedBuffer), | ||
| eq(0), | ||
| eq(0L), | ||
| eq(MIN_CHUNK_SIZE), | ||
| eq(false))).andThrow(exception); | ||
| expect(storageRpcMock.getCurrentUploadOffset(eq(UPLOAD_ID))).andReturn(0L); | ||
| expect(storageRpcMock.writeWithResponse( | ||
| eq(UPLOAD_ID), | ||
| capture(capturedBuffer), | ||
| eq(0), | ||
| eq(0L), | ||
| eq(MIN_CHUNK_SIZE), |
There was a problem hiding this comment.
| expect(storageRpcMock.writeWithResponse( | |
| eq(UPLOAD_ID), | |
| capture(capturedBuffer), | |
| eq(0), | |
| eq(0L), | |
| eq(MIN_CHUNK_SIZE), | |
| eq(false))).andThrow(exception); | |
| expect(storageRpcMock.getCurrentUploadOffset(eq(UPLOAD_ID))).andReturn(0L); | |
| expect(storageRpcMock.writeWithResponse( | |
| eq(UPLOAD_ID), | |
| capture(capturedBuffer), | |
| eq(0), | |
| eq(0L), | |
| eq(MIN_CHUNK_SIZE), | |
| expect( | |
| storageRpcMock.writeWithResponse( | |
| eq(UPLOAD_ID), | |
| capture(capturedBuffer), | |
| eq(0), | |
| eq(0L), | |
| eq(MIN_CHUNK_SIZE), | |
| eq(false))) | |
| .andThrow(exception); | |
| expect( | |
| storageRpcMock.writeWithResponse( | |
| eq(UPLOAD_ID), | |
| capture(capturedBuffer), | |
| eq(0), | |
| eq(0L), | |
| eq(MIN_CHUNK_SIZE), | |
| eq(false))) | |
| .andReturn(null); |
| expect(storageRpcMock.writeWithResponse( | ||
| eq(UPLOAD_ID), | ||
| capture(capturedBuffer), | ||
| eq(0), | ||
| eq(0L), | ||
| eq(MIN_CHUNK_SIZE), | ||
| eq(false))).andThrow(exception); | ||
| expect(storageRpcMock.getCurrentUploadOffset(eq(UPLOAD_ID))).andReturn(10L); | ||
| expect(storageRpcMock.writeWithResponse( | ||
| eq(UPLOAD_ID), | ||
| capture(capturedBuffer), | ||
| eq(10), | ||
| eq(10L), | ||
| eq(MIN_CHUNK_SIZE - 10), |
There was a problem hiding this comment.
| expect(storageRpcMock.writeWithResponse( | |
| eq(UPLOAD_ID), | |
| capture(capturedBuffer), | |
| eq(0), | |
| eq(0L), | |
| eq(MIN_CHUNK_SIZE), | |
| eq(false))).andThrow(exception); | |
| expect(storageRpcMock.getCurrentUploadOffset(eq(UPLOAD_ID))).andReturn(10L); | |
| expect(storageRpcMock.writeWithResponse( | |
| eq(UPLOAD_ID), | |
| capture(capturedBuffer), | |
| eq(10), | |
| eq(10L), | |
| eq(MIN_CHUNK_SIZE - 10), | |
| expect( | |
| storageRpcMock.writeWithResponse( | |
| eq(UPLOAD_ID), | |
| capture(capturedBuffer), | |
| eq(0), | |
| eq(0L), | |
| eq(MIN_CHUNK_SIZE), | |
| eq(false))) | |
| .andThrow(exception); | |
| expect( | |
| storageRpcMock.writeWithResponse( | |
| eq(UPLOAD_ID), | |
| capture(capturedBuffer), | |
| eq(10), | |
| eq(10L), | |
| eq(MIN_CHUNK_SIZE - 10), | |
| eq(false))) | |
| .andReturn(null); |
Codecov Report
@@ Coverage Diff @@
## master #604 +/- ##
============================================
- Coverage 64.68% 64.32% -0.36%
+ Complexity 629 621 -8
============================================
Files 32 32
Lines 5255 5317 +62
Branches 510 520 +10
============================================
+ Hits 3399 3420 +21
- Misses 1697 1735 +38
- Partials 159 162 +3
Continue to review full report at Codecov.
|
|
The coverage miss seems to be due to getCurrentUploadOffset in HttpStorageRpc not being tested. This is part of way bigger issue, that entire file doesn't seem to have any coverage. I'm going to go ahead and merge this as is and it should be a follow up issue to get coverage for HttpStorageRpc |
|
I suspect, this fix did not go so well. I am now getting following exceptions sometimes: I think, at very least we should have a better error message. I use version 1.113.4. I'll try to go back to 1.113.3 and see how it goes. Thank you. |
|
Thanks for letting us know, @wildraid! Could you share a snippet of code that you used which caused this error? |
|
@wildraid released a new version with a fix for the issue you raised. Thanks for calling it out! |
|
@frankyn , great news! Thanks for your help! |
Note: @JesseLovelace will be driving this PR to completion as I'll be OOO over the next two weeks. Thanks Jesse!
Fixes #603 ☕️