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

Change chunker test source #959

Merged
merged 2 commits into from Dec 6, 2022
Merged

Conversation

bill-rich
Copy link
Collaborator

Switch to a reader with a predetermined size to limit error sources.

@bill-rich bill-rich requested a review from a team as a code owner December 6, 2022 17:33
Comment on lines 40 to 43
chunkChan <- &chunk
if errors.Is(err, io.EOF) {
break
}
chunkChan <- &chunk
Copy link
Collaborator

Choose a reason for hiding this comment

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

Question: I guess this is implementation dependent, but could we have read data and gotten an EOF error? Maybe we should emit the chunk only if n > 0.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good call. Better to have the catch there just in case.

@bill-rich bill-rich closed this Dec 6, 2022
@bill-rich bill-rich reopened this Dec 6, 2022
@bill-rich bill-rich merged commit 1a1c2e2 into main Dec 6, 2022
@bill-rich bill-rich deleted the THOG-865_Change_chunker_test_source branch December 6, 2022 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants