Skip to content
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

Add unit tests for GoogleCloudStorageClientImpl. #1095

Merged

Conversation

shilpi23pandey
Copy link
Contributor

@shilpi23pandey shilpi23pandey commented Dec 27, 2023

  1. Adds unit tests for
  • listBucket
  • deleteBucket
  • deleteObjects
  • updateObjects
  • compose
  • copy
  1. Add redundant APIs for compose and copy so that GoogleCloudStorageClient implementation is invoked for all APIs.
@shilpi23pandey shilpi23pandey force-pushed the unit-tests branch 2 times, most recently from e137d3a to fce2276 Compare December 28, 2023 05:55
@shilpi23pandey
Copy link
Contributor Author

/gcbrun

@shilpi23pandey
Copy link
Contributor Author

/gcbrun

@shilpi23pandey
Copy link
Contributor Author

/gcbrun

* behavior.
*/
@Override
public void copy(
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we dong more than adding UTs in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are some APIs which share some common code between GoogleCloudStorageImpl and GoogleCloudStorageClientImpl. For example, this copy method implementation is similar for both the clients -they in turn call the https://github.com/GoogleCloudDataproc/hadoop-connectors/pull/1095/files#diff-23a518b24b3819c111aacec5ec168906787ef291585a52e128c1ce776b8ed0fbR246 which contains client specific implementation. To reduce code duplication, this code was not added earlier. However, while writing the UTs realised that with the delegator in place, this method will always call the GoogleCloudStorageImpl copy. So added these implementations here as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want to update the PR description accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@shilpi23pandey shilpi23pandey merged commit 5396469 into GoogleCloudDataproc:master Jan 4, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants