vtutrinov commented on code in PR #8401:
URL: https://github.com/apache/ozone/pull/8401#discussion_r2075441997
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/AbstractRootedOzoneFileSystemTestWithFSO.java:
##########
@@ -226,4 +231,21 @@ void testLeaseRecoverable() throws Exception {
}
}
+ @Test
+ void testIsFileFalseForDir() throws IOException {
+ Path dirPath = new Path(getBucketPath(), "dir1");
+ OFSPath ofsPath = new OFSPath(dirPath, new OzoneConfiguration());
+ getFs().mkdirs(dirPath);
+
+ RootedOzoneFileSystem ofs = (RootedOzoneFileSystem) getFs();
+ BasicRootedOzoneClientAdapterImpl adapter =
(BasicRootedOzoneClientAdapterImpl) ofs.getAdapter();
+ OzoneBucket bucket = adapter.getBucket(ofsPath, false);
+
+ Iterator<? extends OzoneKey> key = bucket.listKeys("");
+ OzoneKey ozoneKey = key.next();
+
+ assertFalse(ozoneKey.isFile());
Review Comment:
I would add an additional assertion for the key name here to show this is
exactly the key we expect
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]