-
Notifications
You must be signed in to change notification settings - Fork 22
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
test(Files): Add integration tests for Files.copy / read* #252
Conversation
abfe16f
to
91d5b2f
Compare
91d5b2f
to
432d640
Compare
f10956c
to
e4a9d68
Compare
70dc106
to
abd07fd
Compare
While doing the change I came across |
} | ||
|
||
return client; | ||
} | ||
|
||
S3AsyncClient readClient() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why you wouldn't just overload client()
with client(boolean crtClient)
? Either way, it is probably worth documenting why a CRT client is not used in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The client()
method saves a reference of that client in the current class. Unlike client()
, readClient()
creates a new client every time a read
needs to be done. This client is later closed when the readChannel is close()
. I think it'd be clearer to have them in separate methods for now, one is a general purpose and the other one is only for reads
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one minor question. Otherwise looking good.
Issue #236
Description of changes:
As discussed in the issue, a
non-crt
asyncclient will be used for reading files through theS3ReadAheadByteChannel
. This is the class used when using the nio api viaFiles.copy
orFiles.read*
.Some private methods have been renamed to better reflect the purpose of them.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.