feat: Add LastRequestExecuting event in resumable upload#2
feat: Add LastRequestExecuting event in resumable upload#2mahendra-google wants to merge 2 commits into
Conversation
mahendra-google
commented
Jun 8, 2026
- Add tests to ensure that event is triggered once in single chunk and multichunk upload
- Add tests to ensure that event is triggered once in single chunk and multichunk upload
There was a problem hiding this comment.
Code Review
This pull request introduces a new LastRequestExecuting event to the ResumableUpload class, which is triggered when the final chunk of data is uploading. It also adds corresponding unit tests to verify the event's behavior in both single-chunk and multi-chunk upload scenarios. The review feedback suggests correcting a minor grammatical typo in the event's XML documentation and splitting two statements onto separate lines in the multi-chunk test file to improve readability.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| /// <summary> | ||
| /// Event called when the final chunk of a data is uploading. | ||
| /// </summary> |
| using (var service = new MockClientService(server.HttpPrefix)) | ||
| { | ||
| var content = knownSize ? new MemoryStream(UploadTestBytes) : new UnknownSizeMemoryStream(UploadTestBytes); | ||
| var uploader = new TestResumableUpload(service, "MultiChunk", "POST", content, "text/plain", chunkSize); int eventInvokeCount = 0; |
There was a problem hiding this comment.
For better readability and adherence to standard C# coding conventions, avoid placing multiple statements on a single line. Please split the uploader initialization and the eventInvokeCount declaration into separate lines.
var uploader = new TestResumableUpload(service, "MultiChunk", "POST", content, "text/plain", chunkSize);
int eventInvokeCount = 0;