test(showcase): add IT against showcase for ResumableUploadCallable - #14244
test(showcase): add IT against showcase for ResumableUploadCallable#14244whowes wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a new integration test class, ITResumableUploadCallable, to verify the resumable upload pipeline against Showcase under various scenarios, including single-chunk, multi-chunk, zero-byte uploads, timeouts, and cancellations. The review feedback recommends awaiting the termination of the ScheduledExecutorService during teardown to prevent potential thread leaks.
| if (executor != null) { | ||
| executor.shutdownNow(); | ||
| } |
There was a problem hiding this comment.
The ScheduledExecutorService is shut down using shutdownNow(), but its termination is not awaited. To prevent thread leaks and ensure resources are fully released before subsequent tests run, please await the executor's termination. Additionally, ensure that teardown or close methods perform explicit null checks before invoking methods on lazily initialized resources to prevent NullPointerException.
if (executor != null) {
executor.shutdownNow();
executor.awaitTermination(TestClientInitializer.AWAIT_TERMINATION_SECONDS, TimeUnit.SECONDS);
}References
- When using lazily initialized resources (such as ExecutorService), ensure that teardown or close methods perform explicit null checks before invoking methods on them to prevent NullPointerException.
04bf956 to
3eb43da
Compare
3eb43da to
7476681
Compare
018d72d to
6362e8a
Compare
4af6505 to
0566d84
Compare
26f77ac to
3d62765
Compare
3d62765 to
7e0b084
Compare
|
|
27e12bd to
4ef352a
Compare
b93f790 to
782059e
Compare
782059e to
6b2a0cc
Compare
6b2a0cc to
cf6cd11
Compare
cf6cd11 to
2711ec2
Compare
4874a77 to
490e7a2
Compare
490e7a2 to
215302d
Compare
231b074 to
7e6eec1
Compare
7e6eec1 to
aff0da6
Compare
Add integration tests against local GAPIC Showcase server for ResumableUploadCallable, validating: 1. Single-chunk upload happy path. 2. Multi-chunk upload with multiple intermediate chunks and final chunk. 3. 0-byte upload and exact-chunk uploads with separate 0-byte finalize request. 4. Future cancellation and timeout handling. 5. Convenience futureCall(request, stream) overload. 6. Per-request ApiCallContext extra header overrides. 7. Stub-level and per-request ResumableUploadCallSettings overrides. 8. Stub-level and per-request global timeout watchdog triggering DeadlineExceededException.
aff0da6 to
e05f31d
Compare



For illustration only - this PR will not be merged. This is basically a unit test for the Callable except against the showcase fake rather than mocks. The proper IT for resumable uploads will operate on the client library level rather than the Callable.