Add/improve some tests, especially around size limits#43
Open
chkno wants to merge 4 commits intozowens:masterfrom
Open
Add/improve some tests, especially around size limits#43chkno wants to merge 4 commits intozowens:masterfrom
chkno wants to merge 4 commits intozowens:masterfrom
Conversation
This is a critical part of the read API. Because the default message size write limit (1mb) is larger than the default read size (8kb), clients using the default limits can write messages they cannot read. Clients needs to be able to distinguish this message-too-big-to-read case from other errors so they can retry the read with a larger ReadLimit.
Owner
|
@chkno A more specific error message does make sense to me. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add/improve some tests, especially around message size limits.
After reading the documentation, and the tests, I wasn't clear about what happens when one tries to read a message larger than ReadLimit, so I added a test for it:
"Message exceeded max byte size"error message text, is part of the client API: Matching this error message text is the only way for clients to know that they need to retry their read with a larger ReadLimit. I find that I need to match this error text to detect this condition in a thing I'm writing that uses commitlog, and I'd feel better if the specific error text was guarded by a test.