Skip to content

Commit c24cc54

Browse files
author
Andrzej Religa
committed
WL#11318 Persist last known set of metadata servers.
Post-push fix: test_component_metadata_ttl needs to exepect 1 metadata refresh less as there is only single refresh() at init now.
1 parent 9e35eee commit c24cc54

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

router/tests/component/test_metadata_ttl.cc

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,20 +243,17 @@ TEST_P(MetadataChacheTTLTestParam, CheckTTLValid) {
243243
ASSERT_THAT(router.kill(), testing::Eq(0));
244244
}
245245

246-
// Note: +1 becuase the router queries for the metadata twice when it
247-
// initializes. Whenever that gets fixed and this test starts failing try
248-
// removing '+1'
249246
INSTANTIATE_TEST_CASE_P(
250247
CheckTTLIsUsedCorrectly, MetadataChacheTTLTestParam,
251248
::testing::Values(
252-
MetadataTTLTestParams("0.4", std::chrono::milliseconds(600), 2 + 1),
253-
MetadataTTLTestParams("1", std::chrono::milliseconds(2500), 3 + 1),
249+
MetadataTTLTestParams("0.4", std::chrono::milliseconds(600), 2),
250+
MetadataTTLTestParams("1", std::chrono::milliseconds(2500), 3),
254251
// check that default is 0.5 if not provided:
255-
MetadataTTLTestParams("", std::chrono::milliseconds(1750), 4 + 1),
252+
MetadataTTLTestParams("", std::chrono::milliseconds(1750), 4),
256253
// check that for 0 there are multiple ttl queries (we can't really
257254
// guess how many there will be, but we should be able to safely assume
258255
// that in 1 second it shold be at least 5 queries)
259-
MetadataTTLTestParams("0", std::chrono::milliseconds(1000), 5 + 1,
256+
MetadataTTLTestParams("0", std::chrono::milliseconds(1000), 5,
260257
/*at_least=*/true)));
261258

262259
class MetadataChacheTTLTestParamInvalid

0 commit comments

Comments
 (0)