1515// specific language governing permissions and limitations
1616// under the License.
1717
18+ #include " olap/snapshot_manager.h"
19+
1820#include < gen_cpp/AgentService_types.h>
1921#include < gtest/gtest-message.h>
2022#include < gtest/gtest-test-part.h>
3032#include " olap/olap_common.h"
3133#include " olap/olap_define.h"
3234#include " olap/options.h"
33- #include " olap/snapshot_manager.h"
3435#include " olap/storage_engine.h"
3536#include " olap/tablet.h"
3637#include " olap/tablet_manager.h"
@@ -82,7 +83,8 @@ TEST_F(SnapshotManagerTest, TestMakeSnapshotInvalidParameters) {
8283 std::string* null_snapshot_path = nullptr ;
8384 bool allow_incremental_clone = false ;
8485
85- Status status = _engine->snapshot_mgr ()->make_snapshot (request, null_snapshot_path, &allow_incremental_clone);
86+ Status status = _engine->snapshot_mgr ()->make_snapshot (request, null_snapshot_path,
87+ &allow_incremental_clone);
8688 EXPECT_FALSE (status.ok ());
8789 EXPECT_EQ (status.code (), ErrorCode::INVALID_ARGUMENT);
8890}
@@ -103,8 +105,8 @@ TEST_F(SnapshotManagerTest, TestConvertRowsetIdsInvalidDir) {
103105 int64_t partition_id = 100 ;
104106 int32_t schema_hash = 54321 ;
105107
106- auto result = _engine->snapshot_mgr ()->convert_rowset_ids (non_existent_dir, tablet_id, replica_id,
107- table_id, partition_id, schema_hash);
108+ auto result = _engine->snapshot_mgr ()->convert_rowset_ids (
109+ non_existent_dir, tablet_id, replica_id, table_id, partition_id, schema_hash);
108110 EXPECT_FALSE (result.has_value ());
109111 EXPECT_EQ (result.error ().code (), ErrorCode::DIR_NOT_EXIST);
110112}
@@ -189,17 +191,17 @@ TEST_F(SnapshotManagerTest, TestConvertRowsetIdsNormal) {
189191
190192 TabletMetaPB converted_meta_pb;
191193 EXPECT_TRUE (TabletMeta::load_from_file (meta_file, &converted_meta_pb).ok ());
192-
194+
193195 EXPECT_EQ (converted_meta_pb.tablet_id (), tablet_id);
194196 EXPECT_EQ (converted_meta_pb.schema_hash (), schema_hash);
195197 EXPECT_EQ (converted_meta_pb.replica_id (), replica_id);
196198 EXPECT_EQ (converted_meta_pb.table_id (), table_id);
197199 EXPECT_EQ (converted_meta_pb.partition_id (), partition_id);
198-
200+
199201 // verify schema
200202 EXPECT_EQ (converted_meta_pb.schema ().num_short_key_columns (), 1 );
201203 EXPECT_EQ (converted_meta_pb.schema ().column_size (), 2 );
202-
204+
203205 // verify index
204206 EXPECT_EQ (converted_meta_pb.schema ().index_size (), 1 );
205207 const TabletIndexPB& converted_index = converted_meta_pb.schema ().index (0 );
@@ -208,7 +210,7 @@ TEST_F(SnapshotManagerTest, TestConvertRowsetIdsNormal) {
208210 EXPECT_EQ (converted_index.index_type (), IndexType::BITMAP);
209211 EXPECT_EQ (converted_index.col_unique_id_size (), 1 );
210212 EXPECT_EQ (converted_index.col_unique_id (0 ), 0 );
211-
213+
212214 // verify rowset meta
213215 EXPECT_EQ (converted_meta_pb.rs_metas_size (), 1 );
214216 const RowsetMetaPB& converted_rowset_meta = converted_meta_pb.rs_metas (0 );
@@ -222,4 +224,4 @@ TEST_F(SnapshotManagerTest, TestConvertRowsetIdsNormal) {
222224 EXPECT_EQ (converted_rowset_meta.num_rows (), 100 );
223225 EXPECT_EQ (converted_rowset_meta.total_disk_size (), 1024 );
224226}
225- }
227+ } // namespace doris
0 commit comments