Skip to content

Commit d3c0cea

Browse files
committed
wip: fix test build error
1 parent 61a3e08 commit d3c0cea

1 file changed

Lines changed: 22 additions & 11 deletions

File tree

kv_cache_manager/manager/test/selection_location_policy_test.cc

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,16 @@ TEST_F(SelectLocationPolicyTest, TestStaticWeightSLPolicyExistsForWrite) {
8282
auto location_map = GenLocationMap(
8383
{{CLS_SERVING, D_MEMPOOL, "pace_01"}, {CLS_SERVING, D_3FS, "3fs_01"}, {CLS_SERVING, D_NFS, "nfs_01"}});
8484
for (int i = 0; i < 100; ++i) {
85-
ASSERT_TRUE(policy.ExistsForWrite(location_map));
85+
std::vector<std::string> prune_loc_ids;
86+
ASSERT_TRUE(policy.ExistsForWrite(location_map, nullptr, prune_loc_ids));
8687
}
8788
}
8889
{
8990
auto location_map = GenLocationMap(
9091
{{CLS_NOT_FOUND, D_MEMPOOL, "pace_01"}, {CLS_NOT_FOUND, D_3FS, "3fs_01"}, {CLS_SERVING, D_NFS, "nfs_01"}});
9192
for (int i = 0; i < 100; ++i) {
92-
ASSERT_TRUE(policy.ExistsForWrite(location_map));
93+
std::vector<std::string> prune_loc_ids;
94+
ASSERT_TRUE(policy.ExistsForWrite(location_map, nullptr, prune_loc_ids));
9395
}
9496
}
9597
{
@@ -98,7 +100,8 @@ TEST_F(SelectLocationPolicyTest, TestStaticWeightSLPolicyExistsForWrite) {
98100
{CLS_NOT_FOUND, D_3FS, "3fs_02"},
99101
{CLS_NOT_FOUND, D_NFS, "nfs_01"}});
100102
for (int i = 0; i < 100; ++i) {
101-
ASSERT_FALSE(policy.ExistsForWrite(location_map));
103+
std::vector<std::string> prune_loc_ids;
104+
ASSERT_FALSE(policy.ExistsForWrite(location_map, nullptr, prune_loc_ids));
102105
}
103106
}
104107
}
@@ -157,26 +160,30 @@ TEST_F(SelectLocationPolicyTest, TestDynamicWeightSLPolicyExistsForWrite) {
157160
auto location_map = GenLocationMap(
158161
{{CLS_SERVING, D_MEMPOOL, "pace_01"}, {CLS_SERVING, D_3FS, "3fs_01"}, {CLS_SERVING, D_NFS, "nfs_01"}});
159162
for (int i = 0; i < 100; ++i) {
160-
ASSERT_TRUE(policy.ExistsForWrite(location_map));
163+
std::vector<std::string> prune_loc_ids;
164+
ASSERT_TRUE(policy.ExistsForWrite(location_map, nullptr, prune_loc_ids));
161165
}
162166
}
163167
{
164168
auto location_map = GenLocationMap({{CLS_SERVING, D_NFS, "nfs_01"}});
165169
for (int i = 0; i < 100; ++i) {
166-
ASSERT_FALSE(policy.ExistsForWrite(location_map));
170+
std::vector<std::string> prune_loc_ids;
171+
ASSERT_FALSE(policy.ExistsForWrite(location_map, nullptr, prune_loc_ids));
167172
}
168173
}
169174
{
170175
auto location_map = GenLocationMap({{CLS_SERVING, D_NFS, "nfs_01"}, {CLS_SERVING, D_NFS, "nfs_02"}});
171176
for (int i = 0; i < 100; ++i) {
172-
ASSERT_FALSE(policy.ExistsForWrite(location_map));
177+
std::vector<std::string> prune_loc_ids;
178+
ASSERT_FALSE(policy.ExistsForWrite(location_map, nullptr, prune_loc_ids));
173179
}
174180
}
175181
{
176182
auto location_map = GenLocationMap(
177183
{{CLS_SERVING, D_3FS, "3fs_01"}, {CLS_SERVING, D_NFS, "nfs_01"}, {CLS_SERVING, D_NFS, "nfs_02"}});
178184
for (int i = 0; i < 100; ++i) {
179-
ASSERT_TRUE(policy.ExistsForWrite(location_map));
185+
std::vector<std::string> prune_loc_ids;
186+
ASSERT_TRUE(policy.ExistsForWrite(location_map, nullptr, prune_loc_ids));
180187
}
181188
}
182189
}
@@ -221,26 +228,30 @@ TEST_F(SelectLocationPolicyTest, TestNamedStorageWeightedSLPolicyExistsForWrite)
221228
auto location_map = GenLocationMap(
222229
{{CLS_SERVING, D_MEMPOOL, "pace_01"}, {CLS_SERVING, D_3FS, "3fs_01"}, {CLS_SERVING, D_NFS, "nfs_01"}});
223230
for (int i = 0; i < 100; ++i) {
224-
ASSERT_TRUE(policy.ExistsForWrite(location_map));
231+
std::vector<std::string> prune_loc_ids;
232+
ASSERT_TRUE(policy.ExistsForWrite(location_map, nullptr, prune_loc_ids));
225233
}
226234
}
227235
{
228236
auto location_map = GenLocationMap({{CLS_WRITING, D_MEMPOOL, "pace_01"}});
229237
for (int i = 0; i < 100; ++i) {
230-
ASSERT_FALSE(policy.ExistsForWrite(location_map));
238+
std::vector<std::string> prune_loc_ids;
239+
ASSERT_FALSE(policy.ExistsForWrite(location_map, nullptr, prune_loc_ids));
231240
}
232241
}
233242
{
234243
auto location_map = GenLocationMap({{CLS_WRITING, D_MEMPOOL, "pace_01"}, {CLS_SERVING, D_3FS, "3fs_02"}});
235244
for (int i = 0; i < 100; ++i) {
236-
ASSERT_FALSE(policy.ExistsForWrite(location_map));
245+
std::vector<std::string> prune_loc_ids;
246+
ASSERT_FALSE(policy.ExistsForWrite(location_map, nullptr, prune_loc_ids));
237247
}
238248
}
239249
{
240250
auto location_map = GenLocationMap(
241251
{{CLS_WRITING, D_MEMPOOL, "pace_01"}, {CLS_SERVING, D_3FS, "3fs_02"}, {CLS_SERVING, D_3FS, "3fs_01"}});
242252
for (int i = 0; i < 100; ++i) {
243-
ASSERT_TRUE(policy.ExistsForWrite(location_map));
253+
std::vector<std::string> prune_loc_ids;
254+
ASSERT_TRUE(policy.ExistsForWrite(location_map, nullptr, prune_loc_ids));
244255
}
245256
}
246257
}

0 commit comments

Comments
 (0)