Skip to content

Commit 320579f

Browse files
kourok
authored andcommitted
apacheGH-39069: [C++][FS][Azure] Use the generic filesystem tests (apache#40567)
### Rationale for this change We should provide common spec for all filesystem API. ### What changes are included in this PR? Enable the generic filesystem tests. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#39069 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent d58791f commit 320579f

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

cpp/src/arrow/filesystem/azurefs.cc

+1
Original file line numberDiff line numberDiff line change
@@ -2898,6 +2898,7 @@ class AzureFileSystem::Impl {
28982898
}
28992899
auto src_url = GetBlobClient(src.container, src.path).GetUrl() + sas_token;
29002900
auto dest_blob_client = GetBlobClient(dest.container, dest.path);
2901+
auto src_url = GetBlobClient(src.container, src.path).GetUrl();
29012902
if (!dest.path.empty()) {
29022903
auto dest_parent = dest.parent();
29032904
if (!dest_parent.path.empty()) {

cpp/src/arrow/filesystem/azurefs_test.cc

+1-5
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ class TestGeneric : public ::testing::Test, public GenericFileSystemTest {
392392
bool allow_move_dir() const override { return false; }
393393
bool allow_move_file() const override { return true; }
394394
bool allow_append_to_file() const override { return true; }
395-
bool have_directory_mtimes() const override { return true; }
395+
bool have_directory_mtimes() const override { return false; }
396396
bool have_flaky_directory_tree_deletion() const override { return false; }
397397
bool have_file_metadata() const override { return true; }
398398
// calloc() used in libxml2's xmlNewGlobalState() is detected as a
@@ -429,8 +429,6 @@ class TestAzuriteGeneric : public TestGeneric {
429429
protected:
430430
// Azurite doesn't support moving files over containers.
431431
bool allow_move_file() const override { return false; }
432-
// Azurite doesn't support directory mtime.
433-
bool have_directory_mtimes() const override { return false; }
434432
// DeleteDir() doesn't work with Azurite on macOS
435433
bool have_flaky_directory_tree_deletion() const override {
436434
return env_->HasSubmitBatchBug();
@@ -451,8 +449,6 @@ class TestAzureFlatNSGeneric : public TestGeneric {
451449
protected:
452450
// Flat namespace account doesn't support moving files over containers.
453451
bool allow_move_file() const override { return false; }
454-
// Flat namespace account doesn't support directory mtime.
455-
bool have_directory_mtimes() const override { return false; }
456452
};
457453

458454
class TestAzureHierarchicalNSGeneric : public TestGeneric {

cpp/src/arrow/filesystem/test_util.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ void GenericFileSystemTest::TestGetFileInfoSelector(FileSystem* fs) {
752752
}
753753

754754
void GenericFileSystemTest::TestGetFileInfoGenerator(FileSystem* fs) {
755-
#if defined(ADDRESS_SANITIZER) || defined(ARROW_VALGRIND)
755+
#ifdef ADDRESS_SANITIZER
756756
if (have_false_positive_memory_leak_with_generator()) {
757757
GTEST_SKIP() << "Filesystem have false positive memory leak with generator";
758758
}

0 commit comments

Comments
 (0)