You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "JingsongLi (via GitHub)" <gi...@apache.org> on 2023/03/24 02:36:03 UTC

[GitHub] [incubator-paimon] JingsongLi commented on a diff in pull request #702: [core] Return sorted snapshot rows by default

JingsongLi commented on code in PR #702:
URL: https://github.com/apache/incubator-paimon/pull/702#discussion_r1147059806


##########
paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/CatalogTableITCase.java:
##########
@@ -53,8 +53,9 @@ public void testSnapshotsTable() throws Exception {
         sql("INSERT INTO T VALUES (3, 4)");
 
         List<Row> result = sql("SELECT snapshot_id, schema_id, commit_kind FROM T$snapshots");
-        assertThat(result)
-                .containsExactlyInAnyOrder(Row.of(1L, 0L, "APPEND"), Row.of(2L, 0L, "APPEND"));
+
+        // check ordered snapshots.
+        assertThat(result).containsSequence(Row.of(1L, 0L, "APPEND"), Row.of(2L, 0L, "APPEND"));

Review Comment:
   Should be `containsExactly`?
   `containsSequence` verifies that the actual group contains the given sequence in the correct order:
   ```
      * Iterable&lt;Ring&gt; elvesRings = newArrayList(vilya, nenya, narya);
      *
      * // assertions will pass
      * assertThat(elvesRings).containsSequence(vilya, nenya)
      *                       .containsSequence(nenya, narya);
   ```



-- 
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@paimon.apache.org

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