]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Very short cache ttl can cause issues with CI
authorNick Porter <nick@portercomputing.co.uk>
Wed, 1 Feb 2023 13:39:37 +0000 (13:39 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Wed, 1 Feb 2023 18:43:59 +0000 (18:43 +0000)
When running under memory sanitizers, tests can be slow enough for the
cache entry to expire

src/tests/modules/cache_rbtree/cache-logic.unlang
src/tests/modules/cache_rbtree/cache-method-logic.unlang
src/tests/modules/cache_rbtree/module.conf
src/tests/modules/cache_redis/module.conf

index 25a6f6b0e47469c47ca681635f1a81b2ed81108d..fd46a84c58a307ff0a735d65f458edf8f441194e 100644 (file)
@@ -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
index 91e8f9a0491bbc209165221e51e27a40a749853e..9c632f2a3942ffbe682edda0e8039b8c48e0f858 100644 (file)
@@ -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
index 00fa59fde9558b34bcab3aa4996a7eb809d911f8..01c70700be5d078c6eab8a5ccca3a4bd9f17f93a 100644 (file)
@@ -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]
index bb9f0991e5e0301b3378a77c5e5cab2ffee71285..ba193bc695d4fc68e3ab92e3ea9f390ec6ce2b7d 100644 (file)
@@ -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]