Github user mushketyk commented on a diff in the pull request: https://github.com/apache/flink/pull/2564#discussion_r91618485 --- Diff: flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/test/util/TestBaseUtils.java --- @@ -480,16 +480,22 @@ protected static File asFile(String path) { resultStrings[i] = (val == null) ? "null" : val.toString(); } } - - assertEquals("Wrong number of elements result", expectedStrings.length, resultStrings.length); + + // + String msg = String.format( + "Different elements in arrays. Expected %d elements: %s. Actual %d elements: %s", + expectedStrings.length, Arrays.toString(expectedStrings), + resultStrings.length, Arrays.toString(resultStrings)); + + assertEquals(msg, expectedStrings.length, resultStrings.length); if (sort) { Arrays.sort(expectedStrings); Arrays.sort(resultStrings); } for (int i = 0; i < expectedStrings.length; i++) { - assertEquals(expectedStrings[i], resultStrings[i]); + assertEquals(msg, expectedStrings[i], resultStrings[i]); --- End diff -- I think it will give more context just as in the comparing lengths case.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---