This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 7fd337b163496c0127943bf954998440d69b08a0
Author: Brian Neradt <[email protected]>
AuthorDate: Tue Dec 9 13:39:58 2025 -0600

    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
    (cherry picked from commit 163056e768a147822d0e2810b48fc1d15ccf0097)
---
 src/iocore/cache/CacheTest.cc | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/iocore/cache/CacheTest.cc b/src/iocore/cache/CacheTest.cc
index 492dd74597..3195d2890a 100644
--- a/src/iocore/cache/CacheTest.cc
+++ b/src/iocore/cache/CacheTest.cc
@@ -659,8 +659,7 @@ test_RamCache(RegressionTest *t, RamCache *cache, const 
char *name, int64_t cach
 
 REGRESSION_TEST(ram_cache)(RegressionTest *t, int level, int *pstatus)
 {
-  // Run with -R 3 for now to trigger this check, until we figure out the CI
-  if (REGRESSION_TEST_EXTENDED > level) {
+  if (REGRESSION_TEST_NIGHTLY > level) {
     *pstatus = REGRESSION_TEST_PASSED;
     return;
   }
@@ -670,7 +669,12 @@ REGRESSION_TEST(ram_cache)(RegressionTest *t, int level, 
int *pstatus)
     *pstatus = REGRESSION_TEST_FAILED;
     return;
   }
-  for (int s = 20; s <= 28; s += 4) {
+
+  // Test cache sizes from 1MB to 16MB. The sample_size is cache_size >> 6, so
+  // the 16MB test runs 262K iterations which completes in reasonable time. 
This
+  // used to run with 256MB (s=28) at 4M+ iterations, which is too much for CI
+  // resulting in failures, either due to timeout or OOM issues.
+  for (int s = 20; s <= 24; s += 4) {
     int64_t cache_size = 1LL << s;
     *pstatus           = REGRESSION_TEST_PASSED;
     if (!test_RamCache(t, new_RamCacheLRU(), "LRU", cache_size) || 
!test_RamCache(t, new_RamCacheCLFUS(), "CLFUS", cache_size)) {

Reply via email to