You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/11/29 09:32:27 UTC

[GitHub] [flink] JingGe commented on a change in pull request #17888: [FLINK-24077][hbase2/HBaseConnectorITCase] fix sporadic ut failing

JingGe commented on a change in pull request #17888:
URL: https://github.com/apache/flink/pull/17888#discussion_r758176389



##########
File path: flink-connectors/flink-connector-hbase-2.2/src/test/java/org/apache/flink/connector/hbase2/HBaseConnectorITCase.java
##########
@@ -250,13 +252,23 @@ public void testTableSink() throws Exception {
                         + " FROM "
                         + TEST_TABLE_1;
 
+        TableResult tableResult = tEnv.executeSql(query);
+
         // wait to finish
-        tEnv.executeSql(query).await();
+        tableResult.await();
+
+        assertEquals(
+                "Expected INSERT rowKind", RowKind.INSERT, tableResult.collect().next().getKind());
 
         // start a batch scan job to verify contents in HBase table
         TableEnvironment batchEnv = TableEnvironment.create(batchSettings);
         batchEnv.executeSql(table2DDL);
 
+        Table countTable =
+                batchEnv.sqlQuery("SELECT COUNT(h.rowkey) FROM " + TEST_TABLE_2 + " AS h");

Review comment:
       This is an additional check before fetching the concrete data of all row. the idea of checking COUNT is to see whether all rows have been inserted successfully. If this check failed, we will know that there was issue with INSERT not SELECT query.




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

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