You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/02/24 20:52:24 UTC

[GitHub] [kafka] guozhangwang opened a new pull request #10205: KAFKA-12323 Follow-up: Refactor the unit test a bit

guozhangwang opened a new pull request #10205:
URL: https://github.com/apache/kafka/pull/10205


   
   ### 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.

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



[GitHub] [kafka] guozhangwang commented on pull request #10205: KAFKA-12323 Follow-up: Refactor the unit test a bit

Posted by GitBox <gi...@apache.org>.
guozhangwang commented on pull request #10205:
URL: https://github.com/apache/kafka/pull/10205#issuecomment-788238202


   Cherry-picked to 2.8 and 2.7, cc RM @vvcephei 


----------------------------------------------------------------
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.

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



[GitHub] [kafka] guozhangwang commented on pull request #10205: KAFKA-12323 Follow-up: Refactor the unit test a bit

Posted by GitBox <gi...@apache.org>.
guozhangwang commented on pull request #10205:
URL: https://github.com/apache/kafka/pull/10205#issuecomment-786132416


   @mjsax updated.


----------------------------------------------------------------
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.

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



[GitHub] [kafka] mjsax commented on a change in pull request #10205: KAFKA-12323 Follow-up: Refactor the unit test a bit

Posted by GitBox <gi...@apache.org>.
mjsax commented on a change in pull request #10205:
URL: https://github.com/apache/kafka/pull/10205#discussion_r582349190



##########
File path: streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamThreadTest.java
##########
@@ -1844,19 +1844,17 @@ public void process(final Object key, final Object value) {}
         assertEquals(0, punctuatedWallClockTime.size());
 
         mockTime.sleep(100L);
-        for (long i = 0L; i < 10L; i++) {

Review comment:
       Why do we remove this loop?

##########
File path: streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamThreadTest.java
##########
@@ -1936,7 +1934,7 @@ public void process(final Object key, final Object value) {
         clientSupplier.consumer.addRecord(new ConsumerRecord<>(
             topic1,
             1,
-            0L,
+            100L,

Review comment:
       nit: can we pick a different value to disambiguate (wall-clock time is set to `100L` above)?




----------------------------------------------------------------
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.

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



[GitHub] [kafka] guozhangwang commented on a change in pull request #10205: KAFKA-12323 Follow-up: Refactor the unit test a bit

Posted by GitBox <gi...@apache.org>.
guozhangwang commented on a change in pull request #10205:
URL: https://github.com/apache/kafka/pull/10205#discussion_r582428237



##########
File path: streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamThreadTest.java
##########
@@ -1936,7 +1934,7 @@ public void process(final Object key, final Object value) {
         clientSupplier.consumer.addRecord(new ConsumerRecord<>(
             topic1,
             1,
-            0L,
+            100L,

Review comment:
       Ack.




----------------------------------------------------------------
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.

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



[GitHub] [kafka] mjsax commented on a change in pull request #10205: KAFKA-12323 Follow-up: Refactor the unit test a bit

Posted by GitBox <gi...@apache.org>.
mjsax commented on a change in pull request #10205:
URL: https://github.com/apache/kafka/pull/10205#discussion_r583261570



##########
File path: streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamThreadTest.java
##########
@@ -1936,8 +1934,8 @@ public void process(final Object key, final Object value) {
         clientSupplier.consumer.addRecord(new ConsumerRecord<>(
             topic1,
             1,
-            0L,
-             100L,
+            110L,
+             110L,

Review comment:
       nit: fix indention




----------------------------------------------------------------
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.

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



[GitHub] [kafka] guozhangwang commented on a change in pull request #10205: KAFKA-12323 Follow-up: Refactor the unit test a bit

Posted by GitBox <gi...@apache.org>.
guozhangwang commented on a change in pull request #10205:
URL: https://github.com/apache/kafka/pull/10205#discussion_r582426740



##########
File path: streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamThreadTest.java
##########
@@ -1844,19 +1844,17 @@ public void process(final Object key, final Object value) {}
         assertEquals(0, punctuatedWallClockTime.size());
 
         mockTime.sleep(100L);
-        for (long i = 0L; i < 10L; i++) {

Review comment:
       Since we do not need it really: a single record is sufficient to trigger the punctuation.




----------------------------------------------------------------
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.

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



[GitHub] [kafka] guozhangwang merged pull request #10205: KAFKA-12323 Follow-up: Refactor the unit test a bit

Posted by GitBox <gi...@apache.org>.
guozhangwang merged pull request #10205:
URL: https://github.com/apache/kafka/pull/10205


   


----------------------------------------------------------------
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.

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