brenden20 commented on code in PR #16291:
URL: https://github.com/apache/kafka/pull/16291#discussion_r1635511431


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/CommitRequestManagerTest.java:
##########
@@ -122,6 +123,48 @@ public void setup() {
         this.props.put(VALUE_DESERIALIZER_CLASS_CONFIG, 
StringDeserializer.class);
     }
 
+    @Test
+    public void testOffsetFetchRequestStateToStringBase() {
+        ConsumerConfig config = mock(ConsumerConfig.class);
+        CommitRequestManager.MemberInfo memberInfo = new 
CommitRequestManager.MemberInfo();

Review Comment:
   I see what you meant now, I have implemented a setter for 
```MemberInfo#memberEpoch``` and set the memberEpoch value. Upon testing, there 
is no "Optional[value]"



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########
@@ -1078,14 +1083,10 @@ private void chainFuture(
         }
 
         @Override
-        public String toString() {
-            return "OffsetFetchRequestState{" +
-                    "requestedPartitions=" + requestedPartitions +
-                    ", memberId=" + memberInfo.memberId.orElse("undefined") +
-                    ", memberEpoch=" + (memberInfo.memberEpoch.isPresent() ? 
memberInfo.memberEpoch.get() : "undefined") +
-                    ", future=" + future +
-                    ", " + toStringBase() +
-                    '}';
+        public String toStringBase() {
+            return super.toStringBase() +
+                    ", requestedPartitions=" + requestedPartitions +
+                    ", future=" + future;

Review Comment:
   I was thinking the same thing but wanted to include just in case, removed now



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to