kou commented on code in PR #38888:
URL: https://github.com/apache/arrow/pull/38888#discussion_r1411527849


##########
cpp/src/arrow/filesystem/azurefs_test.cc:
##########
@@ -666,6 +666,119 @@ TEST_F(AzuriteFileSystemTest, DeleteDirUri) {
   ASSERT_RAISES(Invalid, fs_->DeleteDir("abfs://" + 
PreexistingContainerPath()));
 }
 
+TEST_F(AzuriteFileSystemTest, DeleteDirContentsSuccessContainer) {
+#ifdef __APPLE__
+  GTEST_SKIP() << "This test fails by an Azurite problem: "
+                  "https://github.com/Azure/Azurite/pull/2302";;
+#endif
+  const auto container_path = RandomContainerName();
+  const auto directory_path =
+      internal::ConcatAbstractPath(container_path, RandomDirectoryName());
+  const auto sub_directory_path = internal::ConcatAbstractPath(directory_path, 
"new-sub");
+  const auto sub_blob_path = internal::ConcatAbstractPath(sub_directory_path, 
"sub.txt");
+  const auto top_blob_path = internal::ConcatAbstractPath(directory_path, 
"top.txt");
+  ASSERT_OK(fs_->CreateDir(sub_directory_path, true));
+  ASSERT_OK_AND_ASSIGN(auto output, fs_->OpenOutputStream(sub_blob_path));
+  ASSERT_OK(output->Write(std::string_view("sub")));
+  ASSERT_OK(output->Close());
+  ASSERT_OK_AND_ASSIGN(output, fs_->OpenOutputStream(top_blob_path));
+  ASSERT_OK(output->Write(std::string_view("top")));
+  ASSERT_OK(output->Close());

Review Comment:
   OK. I'll extract them as a method.



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