TanYuxin-tyx commented on code in PR #22573:
URL: https://github.com/apache/flink/pull/22573#discussion_r1196047657


##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/batch/sql/PartitionableSinkITCase.scala:
##########
@@ -83,9 +79,12 @@ class PartitionableSinkITCase extends BatchTestBase {
         "insert into sinkTable select a, max(b), c"
           + " from nonSortTable group by a, c")
       .await()
-    assertEquals(List("1,5,Hi", "1,5,Hi01", "1,5,Hi02"), RESULT1.sorted)
-    assert(RESULT2.isEmpty)
-    assertEquals(
+    assertThatIterable(RESULT1.sorted).containsExactlyElementsOf(
+      List("1,5,Hi", "1,5,Hi01", "1,5,Hi02"))
+    assertThat(RESULT2.isEmpty).isTrue

Review Comment:
   Because it is very complicated to use `isEmpty` for `RESULT2 `, I think that 
using `isTrue` is a better choice.



##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/batch/sql/MiscITCase.scala:
##########
@@ -528,82 +527,97 @@ class MiscITCase extends BatchTestBase {
       Seq(row(false, 1), row(true, 3)))
   }
 
-  @Test(expected = classOf[org.apache.flink.table.api.ValidationException])
+  @Test
   def testTableGenerateFunction(): Unit = {
-    checkResult(
-      "SELECT f, g, v FROM testTable," +
-        "LATERAL TABLE(STRING_SPLIT(f, ' ')) AS T(v)",
-      Seq(row("abcd", "f%g", "abcd"), row("e fg", null, "e"), row("e fg", 
null, "fg"))
-    )
+    assertThatThrownBy(
+      () =>
+        checkResult(
+          "SELECT f, g, v FROM testTable," +
+            "LATERAL TABLE(STRING_SPLIT(f, ' ')) AS T(v)",
+          Seq(row("abcd", "f%g", "abcd"), row("e fg", null, "e"), row("e fg", 
null, "fg"))
+        
)).isInstanceOf(classOf[org.apache.flink.table.api.ValidationException])

Review Comment:
   Fixed.



-- 
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