slinkydeveloper commented on a change in pull request #19039:
URL: https://github.com/apache/flink/pull/19039#discussion_r824739611



##########
File path: 
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/runtime/stream/sql/DataStreamJavaITCase.java
##########
@@ -864,28 +861,28 @@ private void createTableFromElements(
     }
 
     private static void testSchema(Table table, Column... expectedColumns) {
-        assertEquals(ResolvedSchema.of(expectedColumns), 
table.getResolvedSchema());
+        
assertThat(table.getResolvedSchema()).isEqualTo(ResolvedSchema.of(expectedColumns));
     }
 
     private static void testSchema(Table table, ResolvedSchema expectedSchema) 
{
-        assertEquals(expectedSchema, table.getResolvedSchema());
+        assertThat(table.getResolvedSchema()).isEqualTo(expectedSchema);
     }
 
     private static void testSchema(TableResult result, Column... 
expectedColumns) {
-        assertEquals(ResolvedSchema.of(expectedColumns), 
result.getResolvedSchema());
+        
assertThat(result.getResolvedSchema()).isEqualTo(ResolvedSchema.of(expectedColumns));
     }
 
     private static void testResult(TableResult result, Row... expectedRows) {
         final List<Row> actualRows = 
CollectionUtil.iteratorToList(result.collect());
-        assertThat(actualRows, containsInAnyOrder(expectedRows));
+        
assertThat(actualRows).satisfies(matching(containsInAnyOrder(expectedRows)));
     }
 
     @SafeVarargs
     private static <T> void testResult(DataStream<T> dataStream, T... 
expectedResult)
             throws Exception {
         try (CloseableIterator<T> iterator = dataStream.executeAndCollect()) {
             final List<T> list = CollectionUtil.iteratorToList(iterator);
-            assertThat(list, containsInAnyOrder(expectedResult));
+            
assertThat(list).satisfies(matching(containsInAnyOrder(expectedResult)));

Review comment:
       This is not trivial as there are several signatures for 
`containsInAnyOrder` and the limited type inference support of the tool easily 
go crazy and breaks.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to