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/16 03:09:12 UTC

[GitHub] [kafka] mjsax commented on a change in pull request #9730: MINOR: fix error message

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