Skip to content

Commit 49c72f2

Browse files
Corrected one of the new tests
1 parent 54fa491 commit 49c72f2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cachelib/allocator/tests/CacheAllocatorConfigTest.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,20 @@ TEST_F(CacheAllocatorConfigTest, TotalCacheSizeReset1Tier) {
117117
MemoryTierConfigs ratioConfigs = generateTierConfigs(
118118
numTiers, MemoryTierCacheConfig::fromShm().setRatio(1));
119119

120-
// Throws if total cache size is reset to an invalid
121-
// number after tiers are set up (TODO: expand for tnumTiers > 1
122-
// when enabled)
120+
// Resetting total cache size when there's only one tier
121+
// is considered harmless. TODO: when multiple tiers are
122+
// enabled this test needs to be expanded to check that
123+
// validate() throws if total cache size is reset to
124+
// invalid number after configureMemoryTiers is called.
123125
config1.setCacheSize(defaultTotalSize)
124126
.configureMemoryTiers(sizeConfigs)
125127
.setCacheSize(defaultTotalSize - 1);
126-
EXPECT_THROW(config1.validate(), std::invalid_argument);
128+
config1.validate();
127129

128130
config2.setCacheSize(defaultTotalSize)
129131
.configureMemoryTiers(ratioConfigs)
130132
.setCacheSize(defaultTotalSize - 1);
131-
EXPECT_THROW(config2.validate(), std::invalid_argument);
133+
config2.validate();
132134
}
133135

134136
} // namespace tests

0 commit comments

Comments
 (0)