Skip to content

Commit 99272fc

Browse files
committed
style: format V2NonPartitionedTest with clang-format
- Apply clang-format to fix code style issues - Remove trailing whitespaces - Fix indentation and alignment - Ensure consistent formatting with project standards
1 parent 3250b11 commit 99272fc

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

test/manifest_list_reader_test.cc

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -84,32 +84,25 @@ class ManifestListReaderTest : public TempFileTestBase {
8484

8585
std::vector<ManifestFile> PrepareV2NonPartitionedTestManifestList() {
8686
std::vector<ManifestFile> manifest_files;
87-
std::string test_dir_prefix =
88-
"/tmp/db/db/v2_non_partitioned_test/metadata/";
87+
std::string test_dir_prefix = "/tmp/db/db/v2_non_partitioned_test/metadata/";
8988

90-
std::vector<std::string> paths = {
91-
"ccb6dbcb-0611-48da-be68-bd506ea63188-m0.avro",
92-
"b89a10c9-a7a8-4526-99c5-5587a4ea7527-m0.avro",
93-
"a74d20fa-c800-4706-9ddb-66be15a5ecb0-m0.avro",
94-
"ae7d5fce-7245-4335-9b57-bc598c595c84-m0.avro"
95-
};
89+
std::vector<std::string> paths = {"ccb6dbcb-0611-48da-be68-bd506ea63188-m0.avro",
90+
"b89a10c9-a7a8-4526-99c5-5587a4ea7527-m0.avro",
91+
"a74d20fa-c800-4706-9ddb-66be15a5ecb0-m0.avro",
92+
"ae7d5fce-7245-4335-9b57-bc598c595c84-m0.avro"};
9693

9794
std::vector<int64_t> file_size = {7169, 7170, 7169, 7170};
9895

99-
std::vector<int64_t> snapshot_id = {
100-
251167482216575399,
101-
4248697313956014690,
102-
281757490425433194,
103-
5521202581490753283
104-
};
96+
std::vector<int64_t> snapshot_id = {251167482216575399, 4248697313956014690,
97+
281757490425433194, 5521202581490753283};
10598

10699
for (int i = 0; i < 4; ++i) {
107100
ManifestFile manifest_file;
108101
manifest_file.manifest_path = test_dir_prefix + paths[i];
109102
manifest_file.manifest_length = file_size[i];
110-
manifest_file.partition_spec_id = 0;
103+
manifest_file.partition_spec_id = 0;
111104
manifest_file.content = ManifestFile::Content::kData;
112-
manifest_file.sequence_number = 4 - i;
105+
manifest_file.sequence_number = 4 - i;
113106
manifest_file.min_sequence_number = 4 - i;
114107
manifest_file.added_snapshot_id = snapshot_id[i];
115108
manifest_file.added_files_count = 1;
@@ -144,13 +137,12 @@ TEST_F(ManifestListReaderTest, BasicTest) {
144137

145138
TEST_F(ManifestListReaderTest, V2NonPartitionedTest) {
146139
std::string path = GetResourcePath(
147-
"snap-251167482216575399-1-ccb6dbcb-0611-48da-be68-bd506ea63188.avro");
140+
"snap-251167482216575399-1-ccb6dbcb-0611-48da-be68-bd506ea63188.avro");
148141

149142
auto manifest_reader_result = ManifestListReader::MakeReader(path, file_io_);
150143
ASSERT_EQ(manifest_reader_result.has_value(), true);
151144

152-
auto manifest_reader =
153-
std::move(manifest_reader_result.value());
145+
auto manifest_reader = std::move(manifest_reader_result.value());
154146
auto read_result = manifest_reader->Files();
155147
ASSERT_EQ(read_result.has_value(), true);
156148
ASSERT_EQ(read_result.value().size(), 4);
@@ -161,7 +153,7 @@ std::move(manifest_reader_result.value());
161153
// test all the manifest files are non-partitioned
162154
for (const auto& manifest : read_result.value()) {
163155
ASSERT_EQ(manifest.partition_spec_id, 0);
164-
ASSERT_TRUE(manifest.partitions.empty()); //
156+
ASSERT_TRUE(manifest.partitions.empty()); //
165157
ASSERT_EQ(manifest.content, ManifestFile::Content::kData);
166158
}
167159
}

0 commit comments

Comments
 (0)