github-actions[bot] commented on code in PR #17246: URL: https://github.com/apache/doris/pull/17246#discussion_r1121362723
########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { Review Comment: warning: unknown type name 'Status'; did you mean 'doris::Status'? [clang-diagnostic-error] ```suggestion doris::Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { ``` **be/src/common/configbase.h:27:** 'doris::Status' declared here ```cpp class Status; ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { Review Comment: warning: use of undeclared identifier 'S3FileSystemMock' [clang-diagnostic-error] ```cpp Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { Review Comment: warning: unknown type name 'FileWriterPtr'; did you mean 'doris::io::FileWriterPtr'? [clang-diagnostic-error] ```suggestion Status S3FileSystemMock::create_file(const Path& path, doris::io::FileWriterPtr* writer) { ``` **be/src/io/fs/file_writer.h:63:** 'doris::io::FileWriterPtr' declared here ```cpp using FileWriterPtr = std::unique_ptr<FileWriter>; ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { + return Status::OK(); +} + +Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { Review Comment: warning: unknown type name 'Path' [clang-diagnostic-error] ```cpp Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { + return Status::OK(); +} + +Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { Review Comment: warning: unknown type name 'IOContext'; did you mean 'doris::IOContext'? [clang-diagnostic-error] ```suggestion Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, doris::IOContext* io_ctx) { ``` **be/src/io/fs/file_reader.h:26:** 'doris::IOContext' declared here ```cpp struct IOContext; ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { + return Status::OK(); +} + +Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { Review Comment: warning: use of undeclared identifier 'S3FileSystemMock' [clang-diagnostic-error] ```cpp Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { + return Status::OK(); +} + +Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { + return Status::OK(); +} + +Status S3FileSystemMock::delete_file(const Path& path) { Review Comment: warning: unknown type name 'Path' [clang-diagnostic-error] ```cpp Status S3FileSystemMock::delete_file(const Path& path) { ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { + return Status::OK(); +} + +Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { + return Status::OK(); +} + +Status S3FileSystemMock::delete_file(const Path& path) { + return Status::OK(); +} + +Status S3FileSystemMock::create_directory(const Path& path) { Review Comment: warning: unknown type name 'Status'; did you mean 'doris::Status'? [clang-diagnostic-error] ```suggestion doris::Status S3FileSystemMock::create_directory(const Path& path) { ``` **be/src/common/configbase.h:27:** 'doris::Status' declared here ```cpp class Status; ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { + return Status::OK(); +} + +Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { + return Status::OK(); +} + +Status S3FileSystemMock::delete_file(const Path& path) { + return Status::OK(); +} + +Status S3FileSystemMock::create_directory(const Path& path) { + return Status::OK(); +} + +Status S3FileSystemMock::delete_directory(const Path& path) { Review Comment: warning: unknown type name 'Status'; did you mean 'doris::Status'? [clang-diagnostic-error] ```suggestion doris::Status S3FileSystemMock::delete_directory(const Path& path) { ``` **be/src/common/configbase.h:27:** 'doris::Status' declared here ```cpp class Status; ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { + return Status::OK(); +} + +Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { + return Status::OK(); +} + +Status S3FileSystemMock::delete_file(const Path& path) { + return Status::OK(); +} + +Status S3FileSystemMock::create_directory(const Path& path) { + return Status::OK(); +} + +Status S3FileSystemMock::delete_directory(const Path& path) { Review Comment: warning: use of undeclared identifier 'S3FileSystemMock' [clang-diagnostic-error] ```cpp Status S3FileSystemMock::delete_directory(const Path& path) { ^ ``` ########## be/test/io/fs/remote_file_system_mock.h: ########## @@ -0,0 +1,59 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#pragma once + +#include "io/fs/remote_file_system.h" + +namespace doris { +namespace io { + +public class S3FileSystemMock : public io::RemoteFileSystem { Review Comment: warning: expected unqualified-id [clang-diagnostic-error] ```cpp public class S3FileSystemMock : public io::RemoteFileSystem { ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { + return Status::OK(); +} + +Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { + return Status::OK(); +} + +Status S3FileSystemMock::delete_file(const Path& path) { + return Status::OK(); +} + +Status S3FileSystemMock::create_directory(const Path& path) { + return Status::OK(); +} + +Status S3FileSystemMock::delete_directory(const Path& path) { Review Comment: warning: unknown type name 'Path' [clang-diagnostic-error] ```cpp Status S3FileSystemMock::delete_directory(const Path& path) { ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { + return Status::OK(); +} + +Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { Review Comment: warning: unknown type name 'Status'; did you mean 'doris::Status'? [clang-diagnostic-error] ```suggestion doris::Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { ``` **be/src/common/configbase.h:27:** 'doris::Status' declared here ```cpp class Status; ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { + return Status::OK(); +} + +Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { Review Comment: warning: unknown type name 'FileReaderSPtr'; did you mean 'doris::io::FileReaderSPtr'? [clang-diagnostic-error] ```suggestion Status S3FileSystemMock::open_file(const Path& path, doris::io::FileReaderSPtr* reader, IOContext* io_ctx) { ``` **be/src/io/fs/file_reader.h:53:** 'doris::io::FileReaderSPtr' declared here ```cpp using FileReaderSPtr = std::shared_ptr<FileReader>; ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { Review Comment: warning: unknown type name 'Path' [clang-diagnostic-error] ```cpp Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { ^ ``` ########## be/test/olap/tablet_cooldown_test.cpp: ########## @@ -41,21 +42,16 @@ 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: 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()); - put_storage_resource(kResourceId, {s3_fs, 1}); + io::FileSystemSPtr s3_fs(new io::S3FileSystemMock("test_path", "id", Review Comment: warning: no type named 'S3FileSystemMock' in namespace 'doris::io'; did you mean 'S3FileSystem'? [clang-diagnostic-error] ```suggestion io::FileSystemSPtr s3_fs(new io::S3FileSystem("test_path", "id", ``` **be/src/io/fs/s3_file_system.h:35:** 'S3FileSystem' declared here ```cpp class S3FileSystem final : public RemoteFileSystem { ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { + return Status::OK(); +} + +Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { + return Status::OK(); +} + +Status S3FileSystemMock::delete_file(const Path& path) { Review Comment: warning: unknown type name 'Status'; did you mean 'doris::Status'? [clang-diagnostic-error] ```suggestion doris::Status S3FileSystemMock::delete_file(const Path& path) { ``` **be/src/common/configbase.h:27:** 'doris::Status' declared here ```cpp class Status; ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { + return Status::OK(); +} + +Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { + return Status::OK(); +} + +Status S3FileSystemMock::delete_file(const Path& path) { Review Comment: warning: use of undeclared identifier 'S3FileSystemMock' [clang-diagnostic-error] ```cpp Status S3FileSystemMock::delete_file(const Path& path) { ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { + return Status::OK(); +} + +Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { + return Status::OK(); +} + +Status S3FileSystemMock::delete_file(const Path& path) { + return Status::OK(); +} + +Status S3FileSystemMock::create_directory(const Path& path) { Review Comment: warning: use of undeclared identifier 'S3FileSystemMock' [clang-diagnostic-error] ```cpp Status S3FileSystemMock::create_directory(const Path& path) { ^ ``` ########## be/test/io/fs/remote_file_system_mock.cpp: ########## @@ -0,0 +1,71 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#include "remote_file_system_mock.h" + +Status S3FileSystemMock::create_file(const Path& path, FileWriterPtr* writer) { + return Status::OK(); +} + +Status S3FileSystemMock::open_file(const Path& path, FileReaderSPtr* reader, IOContext* io_ctx) { + return Status::OK(); +} + +Status S3FileSystemMock::delete_file(const Path& path) { + return Status::OK(); +} + +Status S3FileSystemMock::create_directory(const Path& path) { Review Comment: warning: unknown type name 'Path' [clang-diagnostic-error] ```cpp Status S3FileSystemMock::create_directory(const Path& path) { ^ ``` ########## be/test/olap/tablet_cooldown_test.cpp: ########## @@ -41,21 +42,16 @@ 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: 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()); - put_storage_resource(kResourceId, {s3_fs, 1}); + io::FileSystemSPtr s3_fs(new io::S3FileSystemMock("test_path", "id", Review Comment: warning: no matching constructor for initialization of 'io::S3FileSystem' [clang-diagnostic-error] ```cpp io::FileSystemSPtr s3_fs(new io::S3FileSystemMock("test_path", "id", ^ ``` **be/src/io/fs/s3_file_system.h:99:** candidate constructor not viable: requires 2 arguments, but 3 were provided ```cpp S3FileSystem(S3Conf&& s3_conf, std::string&& id); ^ ``` **be/src/io/fs/s3_file_system.h:35:** candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 3 were provided ```cpp class S3FileSystem final : public RemoteFileSystem { ^ ``` -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
