From c52b9f9ac77b8493cdb0ae012a790b92cd0e4dcc Mon Sep 17 00:00:00 2001 From: Y Ethan Guo Date: Fri, 29 Jul 2022 15:19:36 -0700 Subject: [PATCH] [MINOR] Fix convertPathWithScheme tests --- .../java/org/apache/hudi/common/fs/TestStorageSchemes.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hudi-common/src/test/java/org/apache/hudi/common/fs/TestStorageSchemes.java b/hudi-common/src/test/java/org/apache/hudi/common/fs/TestStorageSchemes.java index 9b173254ac1c4..354ad6d0cca31 100644 --- a/hudi-common/src/test/java/org/apache/hudi/common/fs/TestStorageSchemes.java +++ b/hudi-common/src/test/java/org/apache/hudi/common/fs/TestStorageSchemes.java @@ -69,6 +69,11 @@ public void testConversionToNewSchema() { assertEquals(s3TablePath3, HoodieWrapperFileSystem.convertPathWithScheme(s3TablePath3, "s3")); Path hdfsTablePath = new Path("hdfs://sandbox.foo.com:8020/test.1234/table1"); - System.out.println(HoodieWrapperFileSystem.convertPathWithScheme(hdfsTablePath, "hdfs")); + assertEquals(hdfsTablePath, HoodieWrapperFileSystem.convertPathWithScheme(hdfsTablePath, "hdfs")); + + Path localTablePath = new Path("file:/var/table1"); + Path localTablePathNoPrefix = new Path("/var/table1"); + assertEquals(localTablePath, HoodieWrapperFileSystem.convertPathWithScheme(localTablePath, "file")); + assertEquals(localTablePath, HoodieWrapperFileSystem.convertPathWithScheme(localTablePathNoPrefix, "file")); } }