kou commented on code in PR #44503:
URL: https://github.com/apache/arrow/pull/44503#discussion_r1812142996
##########
cpp/src/arrow/filesystem/gcsfs_test.cc:
##########
@@ -622,7 +618,7 @@ TEST(GcsFileSystem, ObjectMetadataRoundtrip) {
}
TEST_F(GcsIntegrationTest, GetFileInfoBucket) {
- auto fs = GcsFileSystem::Make(TestGcsOptions());
+ ASSERT_OK_AND_ASSIGN(std::shared_ptr<GcsFileSystem> fs,
GcsFileSystem::Make(TestGcsOptions()));
Review Comment:
Could you keep using `auto`?
##########
cpp/src/arrow/filesystem/gcsfs_test.cc:
##########
@@ -489,17 +489,13 @@ TEST(GcsFileSystem, FileSystemCompare) {
a_options.project_id = "test-only-invalid-project-id";
auto a = GcsFileSystem::Make(a_options);
EXPECT_THAT(a, NotNull());
- EXPECT_TRUE(a->Equals(*a));
Review Comment:
Why do we need to remove this?
Should we change `auto a = GcsFileSystem::Make(a_options);` to
`ASSERT_OK_AND_ASSIGN(auto a, GcsFileSystem::Make(a_options);` instead?
##########
cpp/src/arrow/filesystem/gcsfs_test.cc:
##########
@@ -271,7 +271,7 @@ class TestGCSFSGeneric : public GcsIntegrationTest, public
GenericFileSystemTest
void SetUp() override {
ASSERT_NO_FATAL_FAILURE(GcsIntegrationTest::SetUp());
auto bucket_name = RandomBucketName();
- gcs_fs_ = GcsFileSystem::Make(TestGcsOptions());
+ ASSERT_OK_AND_ASSIGN(std::shared_ptr<GcsFileSystem> gcs_fs_,
GcsFileSystem::Make(TestGcsOptions()));
Review Comment:
```suggestion
ASSERT_OK_AND_ASSIGN(gcs_fs_, GcsFileSystem::Make(TestGcsOptions()));
```
--
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]