Skip to content

Commit 163056e

Browse files
authored
Reduce ram_cache regression test scope for CI stability (#12737)
The ram_cache test was failing in CI when run with -R 3 due to the 256MB cache size test running over 4 million iterations. This caused timeouts or OOM kills in slower CI environments. Reduced the maximum cache size from 256MB to 16MB and lowered the minimum regression level from EXTENDED to NIGHTLY. Fixes: #12728
1 parent 8bdb73e commit 163056e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/iocore/cache/CacheTest.cc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -658,8 +658,7 @@ test_RamCache(RegressionTest *t, RamCache *cache, const char *name, int64_t cach
658658

659659
REGRESSION_TEST(ram_cache)(RegressionTest *t, int level, int *pstatus)
660660
{
661-
// Run with -R 3 for now to trigger this check, until we figure out the CI
662-
if (REGRESSION_TEST_EXTENDED > level) {
661+
if (REGRESSION_TEST_NIGHTLY > level) {
663662
*pstatus = REGRESSION_TEST_PASSED;
664663
return;
665664
}
@@ -669,7 +668,12 @@ REGRESSION_TEST(ram_cache)(RegressionTest *t, int level, int *pstatus)
669668
*pstatus = REGRESSION_TEST_FAILED;
670669
return;
671670
}
672-
for (int s = 20; s <= 28; s += 4) {
671+
672+
// Test cache sizes from 1MB to 16MB. The sample_size is cache_size >> 6, so
673+
// the 16MB test runs 262K iterations which completes in reasonable time. This
674+
// used to run with 256MB (s=28) at 4M+ iterations, which is too much for CI
675+
// resulting in failures, either due to timeout or OOM issues.
676+
for (int s = 20; s <= 24; s += 4) {
673677
int64_t cache_size = 1LL << s;
674678
*pstatus = REGRESSION_TEST_PASSED;
675679
if (!test_RamCache(t, new_RamCacheLRU(), "LRU", cache_size) || !test_RamCache(t, new_RamCacheCLFUS(), "CLFUS", cache_size)) {

0 commit comments

Comments
 (0)