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


##########
cpp/src/arrow/filesystem/azurefs_test.cc:
##########
@@ -1234,30 +1234,32 @@ class TestAzureFileSystem : public ::testing::Test {
   void TestMovePath() {
     Status st;
     auto data = SetUpPreexistingData();
+    auto another_container = PreexistingData::RandomContainerName(rng_);
+    CreateContainer(another_container);
     // When source doesn't exist.
     ASSERT_MOVE("missing-container/src-path", data.ContainerPath("dest-path"), 
ENOENT);
     auto missing_path1 = data.RandomDirectoryPath(rng_);
     ASSERT_MOVE(missing_path1, "missing-container/path", ENOENT);
 
     // But when source exists...
-    if (!WithHierarchicalNamespace()) {
-      // ...and containers are different, we get an error message telling 
cross-container
-      // moves are not implemented.
-      EXPECT_RAISES_WITH_MESSAGE_THAT(
-          NotImplemented,
-          HasCrossContainerNotImplementedMessage(data.ObjectPath(),
-                                                 "missing-container/path"),
-          fs()->Move(data.ObjectPath(), "missing-container/path"));
-      GTEST_SKIP() << "The rest of TestMovePath is not implemented for non-HNS 
scenarios";
-    }
-    auto adlfs_client =
-        datalake_service_client_->GetFileSystemClient(data.container_name);
-    // ...and dest.container doesn't exist.
+    // ...and containers are different, we get an error message telling 
cross-container
+    // moves are not implemented.
     EXPECT_RAISES_WITH_MESSAGE_THAT(
-        IOError, HasMissingParentDirMessage("missing-container/path"),
+        NotImplemented,
+        HasCrossContainerNotImplementedMessage(data.ObjectPath(),
+                                               "missing-container/path"),
         fs()->Move(data.ObjectPath(), "missing-container/path"));
+    EXPECT_RAISES_WITH_MESSAGE_THAT(
+        NotImplemented,
+        HasCrossContainerNotImplementedMessage(data.ObjectPath(),
+                                               another_container + "/path"),
+        fs()->Move(data.ObjectPath(), another_container + "/path"));

Review Comment:
   Could you use `ConcatAbstractPath()`?
   
   ```suggestion
                                                  
ConcatAbstractPath(another_container, "path")),
           fs()->Move(data.ObjectPath(), ConcatAbstractPath(another_container, 
"path")));
   ```



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