-
Notifications
You must be signed in to change notification settings - Fork 84
chore: samples overhaul #3109
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
Merged
Merged
chore: samples overhaul #3109
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
BenWhitehead
commented
May 19, 2025
- Centralize environment variables resolution in new Env utility class
- Leverage StorageITRunner and associated fixtures
- Condense PubSubNotification test classes into one class that can all share a topic
- Replace usages of the word file with blob (GCS doesn't have files, and our library always presents Blob as its name for a gcs object)
- Use TemporaryBucket for tests which depend on specific bucket state.
- Avoids contention between tests trying to change bucket state
- Avoids the "too many bucket modifications" error from gcs due to bucket mutations
- Makes it possible, for running tests in parallel in the future
- Update samples to apply try-with-resource to TransferManager and Storage instances
- Avoid using syntax classes in tests (use storage.x(blob) instead of blob.x())
- Add ITCleanupOldBucketsTest
Warning: This pull request is touching the following templated files:
|
b6ae286
to
a3ce54e
Compare
* Centralize environment variables resolution in new Env utility class * Leverage StorageITRunner and associated fixtures * Condense PubSubNotification test classes into one class that can all share a topic * Replace usages of the word file with blob (GCS doesn't have files, and our library always presents Blob as its name for a gcs object) * Use TemporaryBucket for tests which depend on specific bucket state. 1. Avoids contention between tests trying to change bucket state 2. Avoids the "too many bucket modifications" error from gcs due to bucket mutations 3. Makes it possible, for running tests in parallel in the future * Update samples to apply try-with-resource to TransferManager and Storage instances * Avoid using syntax classes in tests (use storage.x(blob) instead of blob.x()) * Add ITCleanupOldBucketsTest
a3ce54e
to
1d61e21
Compare
BrandonY
approved these changes
May 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: storage
Issues related to the googleapis/java-storage API.
samples
Issues that are directly related to samples.
size: xl
Pull request size is extra large.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.