chia7712 commented on code in PR #15474:
URL: https://github.com/apache/kafka/pull/15474#discussion_r1517951926


##########
tools/src/test/java/org/apache/kafka/tools/GetOffsetShellTest.java:
##########
@@ -52,20 +55,30 @@ public class GetOffsetShellTest {
     private final int topicCount = 4;
     private final int offsetTopicPartitionCount = 4;
     private final ClusterInstance cluster;
+    private final String topicName = "topic";
 
     public GetOffsetShellTest(ClusterInstance cluster) {
         this.cluster = cluster;
     }
 
     private String getTopicName(int i) {
-        return "topic" + i;
+        return topicName + i;
     }
 
-    public void setUp() {
+    @BeforeEach
+    public void before(TestInfo testInfo) {

Review Comment:
   > We should probably have both cases.
   
   There are two cases we want to test:
   
   1. three records are in single request
   2. three records are sent by different request
   
   Hence, we should use `producer#flush` instead of setting different record 
size. The former certainly address both cases. By contrast, we can't ensure the 
"larger" record size can result in multi requests since it depends heavily on 
the buffer size used by producer. For example, the test will get pointless if 
we increase the default buffer size in the future



-- 
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-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to