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 2020/12/11 01:56:12 UTC

[GitHub] [kafka] mjsax opened a new pull request #9730: MINOR: fix error message

mjsax opened a new pull request #9730:
URL: https://github.com/apache/kafka/pull/9730


   Got the accumulator lambda wrong in #9688 
   
   Call for review @ableegoldman 


----------------------------------------------------------------
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 pull request #9730: MINOR: fix error message

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


   Merged to trunk and cherry-picked to `2.7` branch.


----------------------------------------------------------------
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] chia7712 commented on a change in pull request #9730: MINOR: fix error message

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



##########
File path: streams/src/test/java/org/apache/kafka/streams/integration/EosBetaUpgradeIntegrationTest.java
##########
@@ -1045,8 +1045,8 @@ private void checkResultPerKey(final List<KeyValue<Long, Long>> result,
                 assertThat(getAllRecordPerKey(key, result), equalTo(getAllRecordPerKey(key, expectedResult)));
             } catch (final AssertionError error) {
                 throw new AssertionError(
-                    "expected result: " + expectedResult.stream().map(KeyValue::toString).reduce("", (kv, str) -> str.isEmpty() ? kv : str + ", " + kv) +
-                    "\nreceived records: " + result.stream().map(KeyValue::toString).reduce("", (kv, str) -> str.isEmpty() ? kv : str + ", " + kv),
+                    "expected result: " + expectedResult.stream().map(KeyValue::toString).reduce("", (str, kv) -> str.isEmpty() ? kv : str + ", " + kv) +

Review comment:
       How about using ```.collect(Collectors.joining(",")```?




----------------------------------------------------------------
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 #9730: MINOR: fix error message

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



##########
File path: streams/src/test/java/org/apache/kafka/streams/integration/EosBetaUpgradeIntegrationTest.java
##########
@@ -1045,8 +1045,8 @@ private void checkResultPerKey(final List<KeyValue<Long, Long>> result,
                 assertThat(getAllRecordPerKey(key, result), equalTo(getAllRecordPerKey(key, expectedResult)));
             } catch (final AssertionError error) {
                 throw new AssertionError(
-                    "expected result: " + expectedResult.stream().map(KeyValue::toString).reduce("", (kv, str) -> str.isEmpty() ? kv : str + ", " + kv) +
-                    "\nreceived records: " + result.stream().map(KeyValue::toString).reduce("", (kv, str) -> str.isEmpty() ? kv : str + ", " + kv),
+                    "expected result: " + expectedResult.stream().map(KeyValue::toString).reduce("", (str, kv) -> str.isEmpty() ? kv : str + ", " + kv) +

Review comment:
       Still a noob using the JavaStream API... Does this only use the separator if there are more than one element?




----------------------------------------------------------------
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] chia7712 commented on a change in pull request #9730: MINOR: fix error message

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



##########
File path: streams/src/test/java/org/apache/kafka/streams/integration/EosBetaUpgradeIntegrationTest.java
##########
@@ -1045,8 +1045,8 @@ private void checkResultPerKey(final List<KeyValue<Long, Long>> result,
                 assertThat(getAllRecordPerKey(key, result), equalTo(getAllRecordPerKey(key, expectedResult)));
             } catch (final AssertionError error) {
                 throw new AssertionError(
-                    "expected result: " + expectedResult.stream().map(KeyValue::toString).reduce("", (kv, str) -> str.isEmpty() ? kv : str + ", " + kv) +
-                    "\nreceived records: " + result.stream().map(KeyValue::toString).reduce("", (kv, str) -> str.isEmpty() ? kv : str + ", " + kv),
+                    "expected result: " + expectedResult.stream().map(KeyValue::toString).reduce("", (str, kv) -> str.isEmpty() ? kv : str + ", " + kv) +

Review comment:
       > Does this only use the separator if there are more than one element?
   
   yep




----------------------------------------------------------------
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 merged pull request #9730: MINOR: fix error message

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


   


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