From: Nick Porter Date: Wed, 1 Feb 2023 13:39:37 +0000 (+0000) Subject: Very short cache ttl can cause issues with CI X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4619ced08e56c886604d30aa3bf9e3adc3a905fa;p=thirdparty%2Ffreeradius-server.git Very short cache ttl can cause issues with CI When running under memory sanitizers, tests can be slow enough for the cache entry to expire --- diff --git a/src/tests/modules/cache_rbtree/cache-logic.unlang b/src/tests/modules/cache_rbtree/cache-logic.unlang index 25a6f6b0e47..fd46a84c58a 100644 --- a/src/tests/modules/cache_rbtree/cache-logic.unlang +++ b/src/tests/modules/cache_rbtree/cache-logic.unlang @@ -104,7 +104,7 @@ if (!notfound) { } # 14. This should still allow the creation of a new entry -&control.Cache-TTL := -1 +&control.Cache-TTL := -2 cache if (!ok) { @@ -143,7 +143,7 @@ if (&Tmp-String-1 == &control.Tmp-String-1) { } # 20. Check that a new entry is created -&control.Cache-TTL := -1 +&control.Cache-TTL := -2 cache if (!updated) { @@ -168,7 +168,7 @@ if (&Tmp-String-1 != &control.Tmp-String-1) { # 24. Check Cache-Merge = yes works as expected (should update current request) &control.Tmp-String-1 := 'cache me3' -&control.Cache-TTL := -1 +&control.Cache-TTL := -2 &control.Cache-Merge-New := yes cache diff --git a/src/tests/modules/cache_rbtree/cache-method-logic.unlang b/src/tests/modules/cache_rbtree/cache-method-logic.unlang index 91e8f9a0491..9c632f2a394 100644 --- a/src/tests/modules/cache_rbtree/cache-method-logic.unlang +++ b/src/tests/modules/cache_rbtree/cache-method-logic.unlang @@ -61,7 +61,7 @@ if (!notfound) { } # 14. This should still allow the creation of a new entry -&control.Cache-TTL := -1 +&control.Cache-TTL := -2 cache.store if (!updated) { @@ -100,7 +100,7 @@ if (&Tmp-String-1 == &control.Tmp-String-1) { } # 20. Check that a new entry is created -&control.Cache-TTL := -1 +&control.Cache-TTL := -2 cache.store if (!updated) { @@ -125,7 +125,7 @@ if (&Tmp-String-1 != &control.Tmp-String-1) { # 24. Check Cache-Merge = yes works as expected (should update current request) &control.Tmp-String-1 := 'cache me3' -&control.Cache-TTL := -1 +&control.Cache-TTL := -2 &control.Cache-Merge-New := yes cache.store diff --git a/src/tests/modules/cache_rbtree/module.conf b/src/tests/modules/cache_rbtree/module.conf index 00fa59fde95..01c70700be5 100644 --- a/src/tests/modules/cache_rbtree/module.conf +++ b/src/tests/modules/cache_rbtree/module.conf @@ -3,7 +3,7 @@ cache { driver = "rbtree" key = "%{Tmp-String-0}" - ttl = 2 + ttl = 5 update { &Tmp-String-1 := &control.Tmp-String-1[0] @@ -18,7 +18,7 @@ cache cache_update { driver = "rbtree" key = "%{Tmp-String-0}" - ttl = 2 + ttl = 5 # # Update sections in the cache module use very similar @@ -59,7 +59,7 @@ cache cache_bin_key_octets { driver = "rbtree" key = &Tmp-Octets-0 - ttl = 2 + ttl = 5 update { &Tmp-String-1 := &Tmp-String-1[0] @@ -70,7 +70,7 @@ cache cache_bin_key_ipaddr { driver = "rbtree" key = &Tmp-IP-Address-0 - ttl = 2 + ttl = 5 update { &Tmp-String-1 := &Tmp-String-1[0] diff --git a/src/tests/modules/cache_redis/module.conf b/src/tests/modules/cache_redis/module.conf index bb9f0991e5e..ba193bc695d 100644 --- a/src/tests/modules/cache_redis/module.conf +++ b/src/tests/modules/cache_redis/module.conf @@ -12,7 +12,7 @@ cache { } key = "$ENV{MODULE_TEST_UNLANG}%{Tmp-String-0}" - ttl = 2 + ttl = 5 update { &Tmp-String-1 := &control.Tmp-String-1[0] @@ -36,7 +36,7 @@ cache cache_update { } key = "$ENV{MODULE_TEST_UNLANG}%{Tmp-String-0}" - ttl = 2 + ttl = 5 # # Update sections in the cache module use very similar @@ -86,7 +86,7 @@ cache cache_bin_key_octets { } key = &Tmp-Octets-0 - ttl = 2 + ttl = 5 update { &Tmp-String-1 := &Tmp-String-1[0] @@ -106,7 +106,7 @@ cache cache_bin_key_ipaddr { } key = &Tmp-IP-Address-0 - ttl = 2 + ttl = 5 update { &Tmp-String-1 := &Tmp-String-1[0]