-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
code generator is missing unit tests #8
Comments
re (1), that's true, but the intent of the re (2), that's also mildly true. The kgo package includes a three length ETL chain for groups and transactions using this chaining code. All group algorithms are tested in that chaining code as well, and there are other random dedicated unit tests. I do agree though that the generator should have some unit tests just to avoid regressions (albeit the generator is becoming more and more static). I'll look into adding some tests there. My takeaway from this issue is that it has two parts,
|
As pointed out in #8, I had no crc validation on decode. The most obvious place to add that validation (and length validation) is in kmsg, which also makes this validation more broadly applicable to those that do not want to use the kgo package. This has been tested with the chaining tests, and v0 / v1 message sets have been tested with kcl.
As pointed out in #8, I had no crc validation on decode. The most obvious place to add that validation (and length validation) is in kmsg, which also makes this validation more broadly applicable to those that do not want to use the kgo package. This has been tested with the chaining tests, and v0 / v1 message sets have been tested with kcl.
The crc validation was fixed with 5982615, which necessitated a new tag (v0.4.7). For record batches, this was tested with the chaining test in the kgo package itself. For v0/v1 message tests, this was tested with kcl by consuming with The unit tests for code generation will not be api breaking and can come later. |
I'm not too interested in writing unit tests for the generator at this point. The generated code has been tested extensively externally, on top of the internal integration tests. I've changed how code is generated multiple times at this point and am planning on other changes shortly. In light of this, unit tests on generation would mostly just be tests to freeze behavior, which I do not want, and would not actually be that useful. |
RecordBatch
type, there is a crc field which must be used to decode the following data according to https://kafka.apache.org/documentation.html#messageformat. It is not enough just to decode fields as they areThe text was updated successfully, but these errors were encountered: