Conversation
|
Call for review @guozhangwang @bbejeck @vvcephei |
|
retest this please |
|
Retest this please. |
vvcephei
left a comment
There was a problem hiding this comment.
LGTM. Thanks for this cleanup also. Just some nits...
There was a problem hiding this comment.
Continuing from #6053 (comment), it seems strange to place the assignment at the beginning of a line.
This pattern recurs a lot in this PR, so I'll not comment on it further.
There was a problem hiding this comment.
Did a search with Intellij. Hope I found all of them :)
There was a problem hiding this comment.
Could shorten this line with a static import and/or splitting it.
There was a problem hiding this comment.
It looks like this method has just one usage. Should it be inlined?
There was a problem hiding this comment.
Because of new line breaks, the method got too long, and thus, I extracted some parts into own methods to make the build pass (otherwise checkstyle fails).
Happy to address the issue otherwise. But inlining won't work. Please let me know what you think.
There was a problem hiding this comment.
Ah, this is unfortunate, but a good enough justification for me.
There was a problem hiding this comment.
I guess the other option would be to disable the long-method checkstyle for tests. this might be reasonable, since test code is often like this (long sequence of operations and assertions) without harming readability.
As opposed to application code, where the methods are full of logic and conditionals and long methods seriously hinder comprehensibility.
I'm curious what @ijuma thinks about potentially making this exclusion for the whole project?
There was a problem hiding this comment.
Yeah, I'm not opposed to that. Another option is to use inline exclusions.
I'd also say that having long test methods is not great and extracting verify methods is not a bad plan. However, having numbers in the name is bad. Typically one can group assertions in a way that makes sense.
There was a problem hiding this comment.
So what is the conclusion on that? I am fine any way (merge as-is, remove the checkstyle, rename those method (suggestions for better names), "Typically one can group assertions in a way that makes sense" -- not sure how to apply this to this test...)
There was a problem hiding this comment.
Thanks everyone. FWIW, I think my preference is still for putting in a checkstyle exclusion for tests.
But, I'm also fine with merging as-is, if that's your preference @mjsax .
I agree that in general, we can group assertions, but I think in this case it doesn't work out that way.
There was a problem hiding this comment.
Same question about this and the following methods... It looks like they're only used once. Should we inline them?
There was a problem hiding this comment.
I'm a bit skeptical for functions whose name need a number suffix to distinguish with others, since it usually indicates loss of generality :P Could the common logic be shared, or if not I'd suggest we still inline all of them.
There was a problem hiding this comment.
See comment above. The methods have nothing in common besides that they are verifying the store content at some point during the test. Not happy with the naming either, but had no better idea.
There was a problem hiding this comment.
Ditto on this method, which also appears to be used just once.
There was a problem hiding this comment.
Just curious, why is this necessary?
There was a problem hiding this comment.
Intellij warns that some member (eg, processedKeys) are public.
There was a problem hiding this comment.
Sorry, my question was ambiguous. I'm wondering if, since this is a test artifact, we can consider it an internal API and therefore just make the method non-public.
There was a problem hiding this comment.
I guess we could, but if one write a test and uses auto-completion it might be better to keep the public -- otherwise, they won't show up.
There was a problem hiding this comment.
nit: I think this does not need to be broken to two lines as it is still quite short, and less than 3 parameters. Ditto below.
There was a problem hiding this comment.
I like it better if we always break it down. But I will revert if you prefer.
There was a problem hiding this comment.
These are beyond code cleanup, wondering if it is related to jenkins failures?
There was a problem hiding this comment.
Jenkins failed in core test (not sure about older runs -- build was deleted already).
This just closes a test gap.
There was a problem hiding this comment.
Ack, thanks for confirming.
There was a problem hiding this comment.
I'm a bit skeptical for functions whose name need a number suffix to distinguish with others, since it usually indicates loss of generality :P Could the common logic be shared, or if not I'd suggest we still inline all of them.
There was a problem hiding this comment.
maybe worth specifying charset here
|
Updated. Open question is about the extracted test methods. |
518149a to
a474b59
Compare
|
Rebased. Will merge as-is as no other option seems to be better. |
|
Retest this please. |
|
I'd suggest we add an exception to allow inlines for the long unit test cases. Otherwise I'm +1 on this PR. Please feel free to merge afterwards. |
|
Updated this:
|
Not sure how this could have happened. Java8 build passed. Retest this please. |
|
I fixed a build issue that only affected Java 11 a few hours ago. Maybe you need to rebase to include that. |
Reviewers: Bill Bejeck <bill@confluent.io>, John Roesler <john@confluent.io>, Guozhang Wang <guozhang@confluent.io>, Ryanne Dolan <ryannedolan@gmail.com>, Ismael Juma <ismael@confuent.io>
Similar PR as #6053