Skip to content

Conversation

@BenWhitehead
Copy link
Collaborator

New property test against arbitrarily generated data along with buffer size, and app read size.

Ensure the expected number of reads and their sizes are returned for a specific data size.

Ensure channel is closed after full read, and throws a ClosedChannelException when attempted to read after close

New property test against arbitrarily generated data along with buffer size, and app read size.

Ensure the expected number of reads and their sizes are returned for a specific data size.

Ensure channel is closed after full read, and throws a ClosedChannelException when attempted to read after close
@BenWhitehead BenWhitehead requested a review from a team as a code owner June 13, 2022 21:10
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: storage Issues related to the googleapis/java-storage API. labels Jun 13, 2022
long bytesReadIntoBuffer = read - dstRemaining;
Buffers.position(buffer, Math.toIntExact(bytesReadIntoBuffer));
tmpBytesCopied = Math.toIntExact(read);
flipped = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

The flipped variable is confusing for tracking purposes I mean.

}
long copy = Buffers.copy(buffer, new ByteBuffer[] {dst});
if (buffer.remaining() == 0) {
Buffers.clear(buffer);
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this set flipped = false?

@frankyn
Copy link
Contributor

frankyn commented Jun 14, 2022

Chatted over GVC with @BenWhitehead and cleared up the flipped variable.

@BenWhitehead BenWhitehead merged commit 62b6472 into feat/grpc-storage Jun 15, 2022
@BenWhitehead BenWhitehead deleted the read-buffer-tests branch June 15, 2022 20:07
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. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants