diff --git a/cpp/src/arrow/filesystem/azurefs_test.cc b/cpp/src/arrow/filesystem/azurefs_test.cc index 41adf1e163697..60bb6a8c2132d 100644 --- a/cpp/src/arrow/filesystem/azurefs_test.cc +++ b/cpp/src/arrow/filesystem/azurefs_test.cc @@ -321,6 +321,10 @@ TEST_F(TestAzureHNSFileSystem, GetFileInfoObjectWithNestedStructure) { .GetBlockBlobClient(std::string(kObjectName) + "0") .UploadFrom(reinterpret_cast(kLoremIpsum), strlen(kLoremIpsum)); + datalake_service_client_->GetFileSystemClient(PreexistingContainerName()) + .GetDirectoryClient("test-empty-object-dir") + .Create(); + AssertFileInfo(fs_.get(), PreexistingContainerPath() + kObjectName, FileType::File); AssertFileInfo(fs_.get(), PreexistingContainerPath() + kObjectName + "/", FileType::NotFound); @@ -338,6 +342,11 @@ TEST_F(TestAzureHNSFileSystem, GetFileInfoObjectWithNestedStructure) { FileType::NotFound); AssertFileInfo(fs_.get(), PreexistingContainerPath() + "test-object-dir/some_other_di", FileType::NotFound); + + AssertFileInfo(fs_.get(), PreexistingContainerPath() + "test-empty-object-dir", + FileType::Directory); + + // TODO: Add an assert that it did not use ListBlobs to detect directories. } // TODO: Add ADLS Gen2 directory tests.