You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/04/28 23:16:22 UTC

[GitHub] [iceberg] kbendick commented on a diff in pull request #4635: Flink - Fix flakey, order-dependent FlinkTableSource tests for Flink 1.14

kbendick commented on code in PR #4635:
URL: https://github.com/apache/iceberg/pull/4635#discussion_r861374422


##########
flink/v1.14/flink/src/test/java/org/apache/iceberg/flink/TestFlinkTableSource.java:
##########
@@ -119,7 +119,7 @@ public void testLimitPushDown() {
         Row.of(2, "b", 20.0),
         Row.of(3, null, 30.0)
     );
-    Assert.assertEquals("Should produce the expected records", expectedList, resultExceed);
+    assertSameElements(expectedList, resultExceed);

Review Comment:
   For AssertJ, the assertion message is already pretty good. I updated one test so it would fail and here's the output I got. I think it's pretty clean / self explanatory.
   
   ```
   Expecting:
     [+I[1, iceberg, 10.0], +I[2, b, 20.0]]
   to contain exactly in any order:
     [+I[1, iceberg, 10.0]]
   but the following elements were unexpected:
     [+I[2, b, 20.0]]
   ```
   
   With `.as` before the `containsExactlyInAnyOrderElementsOf`, here's the output. I don't personally think it provides much value.
   
   ```
   java.lang.AssertionError: [should contain the same elements] 
   Expecting:
     [+I[1, iceberg, 10.0], +I[2, b, 20.0]]
   to contain exactly in any order:
     [+I[1, iceberg, 10.0]]
   but the following elements were unexpected:
     [+I[2, b, 20.0]]
   ```



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org