Skip to content

test(showcase): add IT against showcase for ResumableUploadCallable - #14244

Draft
whowes wants to merge 1 commit into
whowes/resumable-upload-settingsfrom
whowes/resumable-upload-happy-path-it
Draft

test(showcase): add IT against showcase for ResumableUploadCallable#14244
whowes wants to merge 1 commit into
whowes/resumable-upload-settingsfrom
whowes/resumable-upload-happy-path-it

Conversation

@whowes

@whowes whowes commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

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.

@whowes whowes changed the title For illustration only - add IT against showcase for ResumableUploadCallable test(showcase): add IT against showcase for ResumableUploadCallable Sep 2, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment on lines +174 to +176
if (executor != null) {
executor.shutdownNow();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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
  1. 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.

@whowes
whowes force-pushed the whowes/resumable-upload-happy-path-it branch from 04bf956 to 3eb43da Compare September 2, 2026 17:11
@whowes
whowes force-pushed the whowes/resumable-upload-happy-path-it branch from 3eb43da to 7476681 Compare September 2, 2026 17:12
@whowes
whowes force-pushed the whowes/resumable-upload-happy-path-it branch 2 times, most recently from 018d72d to 6362e8a Compare September 2, 2026 19:01
@whowes
whowes force-pushed the whowes/resumable-upload-happy-path-it branch 2 times, most recently from 4af6505 to 0566d84 Compare September 2, 2026 20:00
@whowes
whowes force-pushed the whowes/resumable-upload-happy-path-it branch 2 times, most recently from 26f77ac to 3d62765 Compare September 2, 2026 22:32
@whowes
whowes force-pushed the whowes/resumable-upload-happy-path-it branch from 3d62765 to 7e0b084 Compare September 3, 2026 05:29
@whowes
whowes changed the base branch from whowes/resumable-upload-factory to whowes/resumable-upload-settings September 3, 2026 05:36
@sonarqubecloud

sonarqubecloud Bot commented Sep 3, 2026

Copy link
Copy Markdown

@sonarqubecloud

sonarqubecloud Bot commented Sep 3, 2026

Copy link
Copy Markdown

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.
@whowes
whowes force-pushed the whowes/resumable-upload-happy-path-it branch from 7e0b084 to 27e12bd Compare September 3, 2026 05:51
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.

1 participant