You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by yu...@apache.org on 2022/09/29 01:42:49 UTC
[hudi] 08/17: [HUDI-4923] Fix flaky TestHoodieReadClient.testReadFilterExistAfterBulkInsertPrepped (#6801)
This is an automated email from the ASF dual-hosted git repository.
yuzhaojing pushed a commit to branch release-0.12.1-rc1
in repository https://gitbox.apache.org/repos/asf/hudi.git
commit 3e82f13f6e47a24f5792e0c411d5992c5c1c43b4
Author: Sivabalan Narayanan <n....@gmail.com>
AuthorDate: Tue Sep 27 04:13:26 2022 -0700
[HUDI-4923] Fix flaky TestHoodieReadClient.testReadFilterExistAfterBulkInsertPrepped (#6801)
Co-authored-by: Raymond Xu <27...@users.noreply.github.com>
---
.../java/org/apache/hudi/client/TestHoodieReadClient.java | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/TestHoodieReadClient.java b/hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/TestHoodieReadClient.java
index 5ff92fe197..bc1d6e03c0 100644
--- a/hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/TestHoodieReadClient.java
+++ b/hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/TestHoodieReadClient.java
@@ -23,6 +23,7 @@ import org.apache.hudi.common.model.HoodieKey;
import org.apache.hudi.common.model.HoodieRecord;
import org.apache.hudi.common.util.Option;
import org.apache.hudi.config.HoodieWriteConfig;
+import org.apache.hudi.exception.HoodieIOException;
import org.apache.hudi.testutils.HoodieClientTestBase;
import org.apache.spark.api.java.JavaPairRDD;
@@ -32,6 +33,7 @@ import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.junit.jupiter.api.Test;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -42,12 +44,23 @@ import static org.apache.hudi.testutils.Assertions.assertNoWriteErrors;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
-@SuppressWarnings("unchecked")
/**
* Test-cases for covering HoodieReadClient APIs
*/
+@SuppressWarnings("unchecked")
public class TestHoodieReadClient extends HoodieClientTestBase {
+ @Override
+ protected void initPath() {
+ try {
+ java.nio.file.Path basePath = tempDir.resolve("dataset");
+ java.nio.file.Files.createDirectories(basePath);
+ this.basePath = basePath.toUri().toString();
+ } catch (IOException ioe) {
+ throw new HoodieIOException(ioe.getMessage(), ioe);
+ }
+ }
+
/**
* Test ReadFilter API after writing new records using HoodieWriteClient.insert.
*/