You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/09/27 02:31:32 UTC

[GitHub] [hudi] xushiyan commented on a diff in pull request #6801: [HUDI-4923] Fixing flaky test in TestHoodieReadClient.testReadFilterExistAfterBulkInsertPrepped

xushiyan commented on code in PR #6801:
URL: https://github.com/apache/hudi/pull/6801#discussion_r980672292


##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/TestHoodieReadClient.java:
##########
@@ -48,6 +51,35 @@
  */
 public class TestHoodieReadClient extends HoodieClientTestBase {
 
+  private String basePathWithoutScheme = null;
+  private static final String LOCAL_FS_SCHEME = "file://";
+
+  /**
+   * Initializes basePath to use local FS.
+   */
+  protected void initPath() {
+    try {
+      java.nio.file.Path basePath = tempDir.resolve("dataset");
+      java.nio.file.Files.createDirectories(basePath);
+      basePathWithoutScheme = basePath.toString().contains("//") ? basePath.toString().substring(basePath.toString().indexOf("//") + 2) : basePath.toString();

Review Comment:
   can we avoid concat fs scheme? please make use of URI. if you do Path#toURI() i think you should get the right scheme



##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/TestHoodieReadClient.java:
##########
@@ -48,6 +51,35 @@
  */
 public class TestHoodieReadClient extends HoodieClientTestBase {
 
+  private String basePathWithoutScheme = null;
+  private static final String LOCAL_FS_SCHEME = "file://";
+
+  /**
+   * Initializes basePath to use local FS.
+   */
+  protected void initPath() {
+    try {
+      java.nio.file.Path basePath = tempDir.resolve("dataset");
+      java.nio.file.Files.createDirectories(basePath);

Review Comment:
   please annotate override wherever applicable. this is from HoodieCommonTestHarness#initPath



-- 
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: commits-unsubscribe@hudi.apache.org

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