You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "jeffkbkim (via GitHub)" <gi...@apache.org> on 2023/07/28 16:19:22 UTC
[GitHub] [kafka] jeffkbkim opened a new pull request, #14122: MINOR: GroupMetadataManagerTest.java style fix
jeffkbkim opened a new pull request, #14122:
URL: https://github.com/apache/kafka/pull/14122
This patch makes the styling consistent inside GroupMetadataManagerTest.java.
Also, it adds `JoinResult` to simplify the JoinGroup API responses in the tests.
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on a diff in pull request #14122: KAFKA-14500; [7/7] Refactor GroupMetadataManagerTest
Posted by "dajac (via GitHub)" <gi...@apache.org>.
dajac commented on code in PR #14122:
URL: https://github.com/apache/kafka/pull/14122#discussion_r1311531193
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -4007,41 +3968,21 @@ public void testDynamicMembersJoinGroupWithMaxSizeAndRequiredKnownMember() {
// First round of join requests. Generate member ids. All requests will be accepted
// as the group is still Empty.
- List<CompletableFuture<JoinGroupResponseData>> firstRoundFutures = new ArrayList<>();
- IntStream.range(0, groupMaxSize + 1).forEach(i -> {
- CompletableFuture<JoinGroupResponseData> responseFuture = new CompletableFuture<>();
- firstRoundFutures.add(responseFuture);
- CoordinatorResult<Void, Record> result = context.sendGenericGroupJoin(request, responseFuture, requiredKnownMemberId);
- assertTrue(responseFuture.isDone());
- JoinGroupResponseData response = null;
- try {
- response = responseFuture.get();
- } catch (Exception ignored) {
- }
- assertNotNull(response);
- assertEquals(Errors.MEMBER_ID_REQUIRED.code(), response.errorCode());
- assertTrue(result.records().isEmpty());
- });
+ List<JoinResult> firstRoundJoinResults = IntStream.range(0, groupMaxSize + 1)
+ .mapToObj(i -> context.sendGenericGroupJoin(request, requiredKnownMemberId)).collect(Collectors.toList());
Review Comment:
nit: Should we format it as follow to keep the style consistent with the following Stream API usaged?
```
List<JoinResult> firstRoundJoinResults = IntStream.range(0, groupMaxSize + 1).mapToObj(i -> context.sendGenericGroupJoin(
request,
requiredKnownMemberId
)).collect(Collectors.toList());
```
alternatively, we could just put `.collect(...)` on a new line. I am fine either ways.
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -9119,4 +8602,397 @@ public void testHeartbeatDuringRebalanceCausesRebalanceInProgress() throws Excep
HeartbeatResponseData heartbeatResponse = context.sendGenericGroupHeartbeat(heartbeatRequest);
assertEquals(Errors.REBALANCE_IN_PROGRESS.code(), heartbeatResponse.errorCode());
}
+
+ public static <T> void assertUnorderedListEquals(
+ List<T> expected,
+ List<T> actual
+ ) {
+ assertEquals(new HashSet<>(expected), new HashSet<>(actual));
+ }
+
+ private void assertResponseEquals(
Review Comment:
nit: Should we make all those helpers static?
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -6173,22 +5815,22 @@ public void testStaticMemberFenceDuplicateSyncingFollowerAfterMemberIdChanged()
.withRebalanceTimeoutMs(10000)
.build();
- CompletableFuture<JoinGroupResponseData> leaderJoinFuture = new CompletableFuture<>();
- CoordinatorResult<Void, Record> result = context.sendGenericGroupJoin(request, leaderJoinFuture);
+ JoinResult leaderJoinResult = context.sendGenericGroupJoin(request);
- assertTrue(result.records().isEmpty());
- assertFalse(leaderJoinFuture.isDone());
+ assertTrue(leaderJoinResult.records.isEmpty());
+ assertFalse(leaderJoinResult.joinFuture.isDone());
assertTrue(group.isInState(PREPARING_REBALANCE));
// Old follower rejoins group will match current member.id.
- CompletableFuture<JoinGroupResponseData> oldFollowerJoinFuture = new CompletableFuture<>();
- result = context.sendGenericGroupJoin(
- request.setMemberId(rebalanceResult.followerId).setGroupInstanceId("follower-instance-id"),
- oldFollowerJoinFuture);
+ JoinResult oldFollowerJoinResult = context.sendGenericGroupJoin(
+ request
Review Comment:
nit: Indentation seems to be off here.
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -4090,13 +4024,8 @@ public void testDynamicMembersJoinGroupWithMaxSizeAndNotRequiredKnownMember() {
.build();
// First round of join requests. This will trigger a rebalance.
- List<CompletableFuture<JoinGroupResponseData>> firstRoundFutures = new ArrayList<>();
- IntStream.range(0, groupMaxSize + 1).forEach(i -> {
- CompletableFuture<JoinGroupResponseData> responseFuture = new CompletableFuture<>();
- firstRoundFutures.add(responseFuture);
- CoordinatorResult<Void, Record> result = context.sendGenericGroupJoin(request, responseFuture, requiredKnownMemberId);
- assertTrue(result.records().isEmpty());
- });
+ List<JoinResult> firstRoundJoinResults = IntStream.range(0, groupMaxSize + 1)
Review Comment:
ditto.
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -8179,29 +7770,30 @@ public void testGenerationIdIncrementsOnRebalance() throws Exception {
.build();
JoinGroupResponseData leaderJoinResponse = context.joinGenericGroupAsDynamicMemberAndCompleteRebalance("group-id");
- CompletableFuture<JoinGroupResponseData> joinFuture = new CompletableFuture<>();
- CoordinatorResult<Void, Record> result = context.sendGenericGroupJoin(
+ JoinResult joinResult = context.sendGenericGroupJoin(
new JoinGroupRequestBuilder()
.withGroupId("group-id")
.withMemberId(leaderJoinResponse.memberId())
.withDefaultProtocolTypeAndProtocols()
- .build(),
- joinFuture);
+ .build()
+ );
- assertTrue(result.records().isEmpty());
- assertTrue(joinFuture.isDone());
- assertEquals(2, joinFuture.get().generationId());
- assertEquals(Errors.NONE.code(), joinFuture.get().errorCode());
+ assertTrue(joinResult.records.isEmpty());
+ assertTrue(joinResult.joinFuture.isDone());
+ assertEquals(2, joinResult.joinFuture.get().generationId());
+ assertEquals(Errors.NONE.code(), joinResult.joinFuture.get().errorCode());
}
private List<JoinGroupResponseMember> toJoinResponseMembers(GenericGroup group) {
Review Comment:
nit: This method could be static? checkJoinGroupResponse as well. Are those two helpers as well?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] mumrah commented on a diff in pull request #14122: KAFKA-14500; [7/7] Refactor GroupMetadataManagerTest
Posted by "mumrah (via GitHub)" <gi...@apache.org>.
mumrah commented on code in PR #14122:
URL: https://github.com/apache/kafka/pull/14122#discussion_r1298845661
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -9119,4 +8742,257 @@ public void testHeartbeatDuringRebalanceCausesRebalanceInProgress() throws Excep
HeartbeatResponseData heartbeatResponse = context.sendGenericGroupHeartbeat(heartbeatRequest);
assertEquals(Errors.REBALANCE_IN_PROGRESS.code(), heartbeatResponse.errorCode());
}
+
+ private static void assertNoOrEmptyResult(List<ExpiredTimeout<Void, Record>> timeouts) {
+ assertTrue(timeouts.size() <= 1);
+ timeouts.forEach(timeout -> assertEquals(EMPTY_RESULT, timeout.result));
+ }
+
+ private List<String> verifyGenericGroupJoinResponses(
+ List<JoinResult> joinResults,
+ int expectedSuccessCount,
+ Errors expectedFailure
+ ) {
+ int successCount = 0;
+ List<String> memberIds = new ArrayList<>();
+ for (JoinResult joinResult : joinResults) {
+ if (!joinResult.joinFuture.isDone()) {
+ fail("All responseFutures should be completed.");
+ }
+ try {
+ JoinGroupResponseData joinResponse = joinResult.joinFuture.get();
+ if (joinResponse.errorCode() == Errors.NONE.code()) {
+ successCount++;
+ } else {
+ assertEquals(expectedFailure.code(), joinResponse.errorCode());
+ }
+ memberIds.add(joinResponse.memberId());
+ } catch (Exception e) {
+ fail("Unexpected exception: " + e.getMessage());
+ }
+ }
+
+ assertEquals(expectedSuccessCount, successCount);
+ return memberIds;
+ }
+
+ private static JoinGroupRequestProtocolCollection toProtocols(String... protocolNames) {
+ JoinGroupRequestProtocolCollection protocols = new JoinGroupRequestProtocolCollection(0);
+ List<String> topicNames = Arrays.asList("foo", "bar", "baz");
+ for (int i = 0; i < protocolNames.length; i++) {
+ protocols.add(new JoinGroupRequestProtocol()
+ .setName(protocolNames[i])
+ .setMetadata(ConsumerProtocol.serializeSubscription(new ConsumerPartitionAssignor.Subscription(
+ Collections.singletonList(topicNames.get(i % topicNames.size())))).array())
+ );
+ }
+ return protocols;
+ }
+
+ private static Record newGroupMetadataRecord(
+ String groupId,
+ GroupMetadataValue value,
+ MetadataVersion metadataVersion
+ ) {
+ return new Record(
+ new ApiMessageAndVersion(
+ new GroupMetadataKey()
+ .setGroup(groupId),
+ (short) 2
+ ),
+ new ApiMessageAndVersion(
+ value,
+ metadataVersion.groupMetadataValueVersion()
+ )
+ );
+ }
+
+ private static Record newGroupMetadataRecordWithCurrentState(
+ GenericGroup group,
+ MetadataVersion metadataVersion
+ ) {
+ return RecordHelpers.newGroupMetadataRecord(group, group.groupAssignment(), metadataVersion);
+ }
+
+ private static class JoinGroupRequestBuilder {
Review Comment:
I realize it's not really in scope here (since these Builder classes already existed), but it's worth noting that the ApiMessage class support a fluent style API already. So, we could probably do without these builders.
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -9119,4 +8742,257 @@ public void testHeartbeatDuringRebalanceCausesRebalanceInProgress() throws Excep
HeartbeatResponseData heartbeatResponse = context.sendGenericGroupHeartbeat(heartbeatRequest);
assertEquals(Errors.REBALANCE_IN_PROGRESS.code(), heartbeatResponse.errorCode());
}
+
Review Comment:
Is it possible to keep these helper functions and classes in their original locations? As it stands, it's hard to see if anything actually change. If nothing did change, we should leave them where they are to minimize the diff (unless there's a good reason to move them)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on a diff in pull request #14122: KAFKA-14500; [7/7] Refactor GroupMetadataManagerTest
Posted by "dajac (via GitHub)" <gi...@apache.org>.
dajac commented on code in PR #14122:
URL: https://github.com/apache/kafka/pull/14122#discussion_r1311539158
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -9119,4 +8742,257 @@ public void testHeartbeatDuringRebalanceCausesRebalanceInProgress() throws Excep
HeartbeatResponseData heartbeatResponse = context.sendGenericGroupHeartbeat(heartbeatRequest);
assertEquals(Errors.REBALANCE_IN_PROGRESS.code(), heartbeatResponse.errorCode());
}
+
+ private static void assertNoOrEmptyResult(List<ExpiredTimeout<Void, Record>> timeouts) {
+ assertTrue(timeouts.size() <= 1);
+ timeouts.forEach(timeout -> assertEquals(EMPTY_RESULT, timeout.result));
+ }
+
+ private List<String> verifyGenericGroupJoinResponses(
+ List<JoinResult> joinResults,
+ int expectedSuccessCount,
+ Errors expectedFailure
+ ) {
+ int successCount = 0;
+ List<String> memberIds = new ArrayList<>();
+ for (JoinResult joinResult : joinResults) {
+ if (!joinResult.joinFuture.isDone()) {
+ fail("All responseFutures should be completed.");
+ }
+ try {
+ JoinGroupResponseData joinResponse = joinResult.joinFuture.get();
+ if (joinResponse.errorCode() == Errors.NONE.code()) {
+ successCount++;
+ } else {
+ assertEquals(expectedFailure.code(), joinResponse.errorCode());
+ }
+ memberIds.add(joinResponse.memberId());
+ } catch (Exception e) {
+ fail("Unexpected exception: " + e.getMessage());
+ }
+ }
+
+ assertEquals(expectedSuccessCount, successCount);
+ return memberIds;
+ }
+
+ private static JoinGroupRequestProtocolCollection toProtocols(String... protocolNames) {
+ JoinGroupRequestProtocolCollection protocols = new JoinGroupRequestProtocolCollection(0);
+ List<String> topicNames = Arrays.asList("foo", "bar", "baz");
+ for (int i = 0; i < protocolNames.length; i++) {
+ protocols.add(new JoinGroupRequestProtocol()
+ .setName(protocolNames[i])
+ .setMetadata(ConsumerProtocol.serializeSubscription(new ConsumerPartitionAssignor.Subscription(
+ Collections.singletonList(topicNames.get(i % topicNames.size())))).array())
+ );
+ }
+ return protocols;
+ }
+
+ private static Record newGroupMetadataRecord(
+ String groupId,
+ GroupMetadataValue value,
+ MetadataVersion metadataVersion
+ ) {
+ return new Record(
+ new ApiMessageAndVersion(
+ new GroupMetadataKey()
+ .setGroup(groupId),
+ (short) 2
+ ),
+ new ApiMessageAndVersion(
+ value,
+ metadataVersion.groupMetadataValueVersion()
+ )
+ );
+ }
+
+ private static Record newGroupMetadataRecordWithCurrentState(
+ GenericGroup group,
+ MetadataVersion metadataVersion
+ ) {
+ return RecordHelpers.newGroupMetadataRecord(group, group.groupAssignment(), metadataVersion);
+ }
+
+ private static class JoinGroupRequestBuilder {
Review Comment:
Thanks @jeffkbkim. I agree with David here but I am fine with doing it in a follow up PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] jeffkbkim commented on a diff in pull request #14122: KAFKA-14500; [7/7] Refactor GroupMetadataManagerTest
Posted by "jeffkbkim (via GitHub)" <gi...@apache.org>.
jeffkbkim commented on code in PR #14122:
URL: https://github.com/apache/kafka/pull/14122#discussion_r1309021495
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -9119,4 +8742,257 @@ public void testHeartbeatDuringRebalanceCausesRebalanceInProgress() throws Excep
HeartbeatResponseData heartbeatResponse = context.sendGenericGroupHeartbeat(heartbeatRequest);
assertEquals(Errors.REBALANCE_IN_PROGRESS.code(), heartbeatResponse.errorCode());
}
+
+ private static void assertNoOrEmptyResult(List<ExpiredTimeout<Void, Record>> timeouts) {
+ assertTrue(timeouts.size() <= 1);
+ timeouts.forEach(timeout -> assertEquals(EMPTY_RESULT, timeout.result));
+ }
+
+ private List<String> verifyGenericGroupJoinResponses(
+ List<JoinResult> joinResults,
+ int expectedSuccessCount,
+ Errors expectedFailure
+ ) {
+ int successCount = 0;
+ List<String> memberIds = new ArrayList<>();
+ for (JoinResult joinResult : joinResults) {
+ if (!joinResult.joinFuture.isDone()) {
+ fail("All responseFutures should be completed.");
+ }
+ try {
+ JoinGroupResponseData joinResponse = joinResult.joinFuture.get();
+ if (joinResponse.errorCode() == Errors.NONE.code()) {
+ successCount++;
+ } else {
+ assertEquals(expectedFailure.code(), joinResponse.errorCode());
+ }
+ memberIds.add(joinResponse.memberId());
+ } catch (Exception e) {
+ fail("Unexpected exception: " + e.getMessage());
+ }
+ }
+
+ assertEquals(expectedSuccessCount, successCount);
+ return memberIds;
+ }
+
+ private static JoinGroupRequestProtocolCollection toProtocols(String... protocolNames) {
+ JoinGroupRequestProtocolCollection protocols = new JoinGroupRequestProtocolCollection(0);
+ List<String> topicNames = Arrays.asList("foo", "bar", "baz");
+ for (int i = 0; i < protocolNames.length; i++) {
+ protocols.add(new JoinGroupRequestProtocol()
+ .setName(protocolNames[i])
+ .setMetadata(ConsumerProtocol.serializeSubscription(new ConsumerPartitionAssignor.Subscription(
+ Collections.singletonList(topicNames.get(i % topicNames.size())))).array())
+ );
+ }
+ return protocols;
+ }
+
+ private static Record newGroupMetadataRecord(
+ String groupId,
+ GroupMetadataValue value,
+ MetadataVersion metadataVersion
+ ) {
+ return new Record(
+ new ApiMessageAndVersion(
+ new GroupMetadataKey()
+ .setGroup(groupId),
+ (short) 2
+ ),
+ new ApiMessageAndVersion(
+ value,
+ metadataVersion.groupMetadataValueVersion()
+ )
+ );
+ }
+
+ private static Record newGroupMetadataRecordWithCurrentState(
+ GenericGroup group,
+ MetadataVersion metadataVersion
+ ) {
+ return RecordHelpers.newGroupMetadataRecord(group, group.groupAssignment(), metadataVersion);
+ }
+
+ private static class JoinGroupRequestBuilder {
Review Comment:
@mumrah that makes sense. I will do this as a follow up PR as https://github.com/apache/kafka/pull/14147 is built on this PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] jeffkbkim commented on a diff in pull request #14122: KAFKA-14500; [7/7] Refactor GroupMetadataManagerTest
Posted by "jeffkbkim (via GitHub)" <gi...@apache.org>.
jeffkbkim commented on code in PR #14122:
URL: https://github.com/apache/kafka/pull/14122#discussion_r1310959090
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -9119,4 +8742,257 @@ public void testHeartbeatDuringRebalanceCausesRebalanceInProgress() throws Excep
HeartbeatResponseData heartbeatResponse = context.sendGenericGroupHeartbeat(heartbeatRequest);
assertEquals(Errors.REBALANCE_IN_PROGRESS.code(), heartbeatResponse.errorCode());
}
+
Review Comment:
i've moved them to the bottom so that all the helpers are centralized.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] jeffkbkim commented on a diff in pull request #14122: KAFKA-14500; [7/7] Refactor GroupMetadataManagerTest
Posted by "jeffkbkim (via GitHub)" <gi...@apache.org>.
jeffkbkim commented on code in PR #14122:
URL: https://github.com/apache/kafka/pull/14122#discussion_r1311902770
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -9119,4 +8602,397 @@ public void testHeartbeatDuringRebalanceCausesRebalanceInProgress() throws Excep
HeartbeatResponseData heartbeatResponse = context.sendGenericGroupHeartbeat(heartbeatRequest);
assertEquals(Errors.REBALANCE_IN_PROGRESS.code(), heartbeatResponse.errorCode());
}
+
+ public static <T> void assertUnorderedListEquals(
+ List<T> expected,
+ List<T> actual
+ ) {
+ assertEquals(new HashSet<>(expected), new HashSet<>(actual));
+ }
+
+ private void assertResponseEquals(
Review Comment:
made all helpers static
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on a diff in pull request #14122: KAFKA-14500; [7/7] Refactor GroupMetadataManagerTest
Posted by "dajac (via GitHub)" <gi...@apache.org>.
dajac commented on code in PR #14122:
URL: https://github.com/apache/kafka/pull/14122#discussion_r1311538573
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -9119,4 +8742,257 @@ public void testHeartbeatDuringRebalanceCausesRebalanceInProgress() throws Excep
HeartbeatResponseData heartbeatResponse = context.sendGenericGroupHeartbeat(heartbeatRequest);
assertEquals(Errors.REBALANCE_IN_PROGRESS.code(), heartbeatResponse.errorCode());
}
+
Review Comment:
That makes sense to me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] jeffkbkim commented on a diff in pull request #14122: KAFKA-14500; [7/7] Refactor GroupMetadataManagerTest
Posted by "jeffkbkim (via GitHub)" <gi...@apache.org>.
jeffkbkim commented on code in PR #14122:
URL: https://github.com/apache/kafka/pull/14122#discussion_r1311901030
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupMetadataManagerTest.java:
##########
@@ -8179,29 +7770,30 @@ public void testGenerationIdIncrementsOnRebalance() throws Exception {
.build();
JoinGroupResponseData leaderJoinResponse = context.joinGenericGroupAsDynamicMemberAndCompleteRebalance("group-id");
- CompletableFuture<JoinGroupResponseData> joinFuture = new CompletableFuture<>();
- CoordinatorResult<Void, Record> result = context.sendGenericGroupJoin(
+ JoinResult joinResult = context.sendGenericGroupJoin(
new JoinGroupRequestBuilder()
.withGroupId("group-id")
.withMemberId(leaderJoinResponse.memberId())
.withDefaultProtocolTypeAndProtocols()
- .build(),
- joinFuture);
+ .build()
+ );
- assertTrue(result.records().isEmpty());
- assertTrue(joinFuture.isDone());
- assertEquals(2, joinFuture.get().generationId());
- assertEquals(Errors.NONE.code(), joinFuture.get().errorCode());
+ assertTrue(joinResult.records.isEmpty());
+ assertTrue(joinResult.joinFuture.isDone());
+ assertEquals(2, joinResult.joinFuture.get().generationId());
+ assertEquals(Errors.NONE.code(), joinResult.joinFuture.get().errorCode());
}
private List<JoinGroupResponseMember> toJoinResponseMembers(GenericGroup group) {
Review Comment:
thanks. updated and moved to the bottom
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac merged pull request #14122: KAFKA-14500; [7/7] Refactor GroupMetadataManagerTest
Posted by "dajac (via GitHub)" <gi...@apache.org>.
dajac merged PR #14122:
URL: https://github.com/apache/kafka/pull/14122
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org