github-actions[bot] commented on code in PR #17246: URL: https://github.com/apache/doris/pull/17246#discussion_r1121247527
########## be/test/olap/tablet_cooldown_test.cpp: ########## @@ -41,20 +42,17 @@ static const std::string kTestDir = "./ut_dir/tablet_cooldown_test"; static constexpr int64_t kResourceId = 10000; static constexpr int64_t kStoragePolicyId = 10002; + // remove DISABLED_ when need run this test -#define TabletCooldownTest DISABLED_TabletCooldownTest +// #define TabletCooldownTest DISABLED_TabletCooldownTest class TabletCooldownTest : public testing::Test { public: + class S3FileSystemMock : public io::RemoteFileSystem { + S3FileSystemMock() {} Review Comment: warning: constructor for 'doris::TabletCooldownTest::S3FileSystemMock' must explicitly initialize the base class 'io::RemoteFileSystem' which does not have a default constructor [clang-diagnostic-error] ```cpp S3FileSystemMock() {} ^ ``` **be/src/io/fs/remote_file_system.h:24:** 'doris::io::RemoteFileSystem' declared here ```cpp class RemoteFileSystem : public FileSystem { ^ ``` ########## be/test/olap/tablet_cooldown_test.cpp: ########## @@ -41,20 +42,17 @@ static constexpr int64_t kResourceId = 10000; static constexpr int64_t kStoragePolicyId = 10002; + // remove DISABLED_ when need run this test -#define TabletCooldownTest DISABLED_TabletCooldownTest +// #define TabletCooldownTest DISABLED_TabletCooldownTest class TabletCooldownTest : public testing::Test { public: + class S3FileSystemMock : public io::RemoteFileSystem { + S3FileSystemMock() {} Review Comment: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] ```suggestion S3FileSystemMock() = default; ``` ########## be/test/olap/tablet_cooldown_test.cpp: ########## @@ -41,20 +42,17 @@ static constexpr int64_t kResourceId = 10000; static constexpr int64_t kStoragePolicyId = 10002; + // remove DISABLED_ when need run this test -#define TabletCooldownTest DISABLED_TabletCooldownTest +// #define TabletCooldownTest DISABLED_TabletCooldownTest class TabletCooldownTest : public testing::Test { public: + class S3FileSystemMock : public io::RemoteFileSystem { + S3FileSystemMock() {} + }; + static void SetUpTestSuite() { - S3Conf s3_conf; - s3_conf.ak = config::test_s3_ak; - s3_conf.sk = config::test_s3_sk; - s3_conf.endpoint = config::test_s3_endpoint; - s3_conf.region = config::test_s3_region; - s3_conf.bucket = config::test_s3_bucket; - s3_conf.prefix = config::test_s3_prefix + "/tablet_cooldown_test"; - auto s3_fs = io::S3FileSystem::create(std::move(s3_conf), std::to_string(kResourceId)); - ASSERT_TRUE(s3_fs->connect().ok()); + S3FileSystemMock s3_fs; Review Comment: warning: variable type 'doris::TabletCooldownTest::S3FileSystemMock' is an abstract class [clang-diagnostic-error] ```cpp S3FileSystemMock s3_fs; ^ ``` **be/src/io/fs/file_system.h:47:** unimplemented pure virtual method 'create_file' in 'S3FileSystemMock' ```cpp virtual Status create_file(const Path& path, FileWriterPtr* writer) = 0; ^ ``` **be/src/io/fs/file_system.h:54:** unimplemented pure virtual method 'delete_file' in 'S3FileSystemMock' ```cpp virtual Status delete_file(const Path& path) = 0; ^ ``` **be/src/io/fs/file_system.h:57:** unimplemented pure virtual method 'create_directory' in 'S3FileSystemMock' ```cpp virtual Status create_directory(const Path& path) = 0; ^ ``` **be/src/io/fs/file_system.h:60:** unimplemented pure virtual method 'delete_directory' in 'S3FileSystemMock' ```cpp virtual Status delete_directory(const Path& path) = 0; ^ ``` **be/src/io/fs/file_system.h:64:** unimplemented pure virtual method 'link_file' in 'S3FileSystemMock' ```cpp virtual Status link_file(const Path& src, const Path& dest) = 0; ^ ``` **be/src/io/fs/file_system.h:66:** unimplemented pure virtual method 'exists' in 'S3FileSystemMock' ```cpp virtual Status exists(const Path& path, bool* res) const = 0; ^ ``` **be/src/io/fs/file_system.h:68:** unimplemented pure virtual method 'file_size' in 'S3FileSystemMock' ```cpp virtual Status file_size(const Path& path, size_t* file_size) const = 0; ^ ``` **be/src/io/fs/file_system.h:70:** unimplemented pure virtual method 'list' in 'S3FileSystemMock' ```cpp virtual Status list(const Path& path, std::vector<Path>* files) = 0; ^ ``` **be/src/io/fs/remote_file_system.h:31:** unimplemented pure virtual method 'upload' in 'S3FileSystemMock' ```cpp virtual Status upload(const Path& local_path, const Path& dest_path) = 0; ^ ``` **be/src/io/fs/remote_file_system.h:33:** unimplemented pure virtual method 'batch_upload' in 'S3FileSystemMock' ```cpp virtual Status batch_upload(const std::vector<Path>& local_paths, ^ ``` **be/src/io/fs/remote_file_system.h:40:** unimplemented pure virtual method 'connect' in 'S3FileSystemMock' ```cpp virtual Status connect() = 0; ^ ``` -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org