cshuo commented on code in PR #19542:
URL: https://github.com/apache/hudi/pull/19542#discussion_r3726719890


##########
hudi-hadoop-common/src/test/java/org/apache/hudi/hadoop/fs/TestHadoopFSUtils.java:
##########
@@ -255,6 +269,121 @@ public void testFileStatusConversion(String path,
         convertedPathInfo, path, length, isDirectory, blockReplication, 
blockSize, modificationTime);
   }
 
+  @Test
+  public void testStorageConfigurationCopyAndFileSystemOverloads(@TempDir 
java.nio.file.Path tempDir) {
+    Configuration conf = new Configuration(false);
+    conf.set("test.key", "before");
+    StorageConfiguration<Configuration> shared = 
HadoopFSUtils.getStorageConf(conf);
+    StorageConfiguration<Configuration> copied = 
HadoopFSUtils.getStorageConfWithCopy(conf);
+    conf.set("test.key", "after");
+
+    assertEquals("after", shared.getString("test.key").get());
+    assertEquals("before", copied.getString("test.key").get());
+    assertEquals("file", HadoopFSUtils.getFs(tempDir.toUri().toString(), 
shared).getScheme());
+    assertEquals("file", HadoopFSUtils.getFs(tempDir.toUri().toString(), 
shared, true).getScheme());
+    assertEquals("file", HadoopFSUtils.getFs(new Path(tempDir.toUri()), 
shared).getScheme());
+    assertEquals("file", HadoopFSUtils.getFs(new Path(tempDir.toUri()), 
shared, true).getScheme());
+    assertEquals("file", HadoopFSUtils.getFs(new StoragePath(tempDir.toUri()), 
conf).getScheme());
+    assertEquals("file", HadoopFSUtils.getFs(tempDir.toString(), conf, 
true).getScheme());
+    assertInstanceOf(StorageConfiguration.class, 
HadoopFSUtils.getStorageConf());
+  }
+
+  @Test
+  public void testAvroPathPermissionAndStatusConversions() {
+    Path path = new Path("s3://bucket/table/file.parquet");

Review Comment:
   Fixed in e32259ed283. Replaced the null equality assertions with assertNull.



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