KAFKA-14595 ReassignPartitionsUnitTest rewritten in java#14355
KAFKA-14595 ReassignPartitionsUnitTest rewritten in java#14355showuon merged 24 commits intoapache:trunkfrom
Conversation
|
Hello, @showuon . Are you ready to join the review? Big PR contains Changes are relatively simple. Please, join the review. |
tledkov
left a comment
There was a problem hiding this comment.
The patch is OK with me.
New java-test looks similar to the removed scala-test.
|
Will review it this week. |
| @BeforeEach | ||
| public void setUp() { | ||
| Exit.setExitProcedure((statusCode, message) -> { | ||
| throw new IllegalArgumentException(message); | ||
| }); | ||
| } | ||
|
|
||
| @AfterEach | ||
| public void tearDown() { | ||
| Exit.resetExitProcedure(); | ||
| } |
There was a problem hiding this comment.
Could we do that in @BeforeAll and @AfterAll?
| )); | ||
|
|
||
| assertEquals(asScala(expStates), actual._1); | ||
| assertEquals(true, actual._2); |
| )); | ||
|
|
||
| assertEquals(asScala(expStates), actual._1); | ||
| assertEquals(false, actual._2); |
| } | ||
|
|
||
| @SuppressWarnings({"deprecation", "unchecked"}) | ||
| private static <T> scala.collection.mutable.Set<T> mset(final T...set) { |
There was a problem hiding this comment.
Could we rename this helper method to a readable name? Ex: mutableSet?
| Tuple2<scala.collection.Map<TopicPartition, ReassignPartitionsCommand.PartitionReassignmentState>, Object> actual = | ||
| findPartitionReassignmentStates(adminClient, seq( | ||
| new Tuple2<>(new TopicPartition("foo", 0), seq(0, 1, 3)), | ||
| new Tuple2<>(new TopicPartition("foo", 1), seq(1, 2, 3)) | ||
| )); | ||
|
|
||
| assertEquals(asScala(expStates), actual._1); |
There was a problem hiding this comment.
I can see this is uneasy to convert these lines. Thanks for the effort.
|
@showuon Thank you for the review! I resolve all your comments. Please, take a look one more time |
showuon
left a comment
There was a problem hiding this comment.
LGTM! Thanks for the PR! Will wait until CI tests completed.
|
@showuon Looks like tests are OK. |
|
Failed tests are unrelated: |
This PR is part of apache#13247 It contains changes to rewrite single test in java. Intention is reduce changes in parent PR. Reviewers: Luke Chen <showuon@gmail.com>, Taras Ledkov <tledkov@apache.org>
This PR is part of apache#13247 It contains changes to rewrite single test in java. Intention is reduce changes in parent PR. Reviewers: Luke Chen <showuon@gmail.com>, Taras Ledkov <tledkov@apache.org>
This PR is part of apache#13247 It contains changes to rewrite single test in java. Intention is reduce changes in parent PR. Reviewers: Luke Chen <showuon@gmail.com>, Taras Ledkov <tledkov@apache.org>
This PR is part of apache#13247 It contains changes to rewrite single test in java. Intention is reduce changes in parent PR. Reviewers: Luke Chen <showuon@gmail.com>, Taras Ledkov <tledkov@apache.org>
This PR is part of #13247
It contains changes to rewrite single test in java.
Intention is reduce changes in parent PR.
Committer Checklist (excluded from commit message)