From: Nick Porter Date: Thu, 12 Sep 2024 10:23:37 +0000 (+0100) Subject: Better handling of the result of redis cluster node failure X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db82470c2f885e69e55bba150eb0e7e7600eb0d1;p=thirdparty%2Ffreeradius-server.git Better handling of the result of redis cluster node failure --- diff --git a/src/tests/modules/redis/cluster_node_fail.unlang b/src/tests/modules/redis/cluster_node_fail.unlang index 0bdbb9c6496..e415ec58699 100644 --- a/src/tests/modules/redis/cluster_node_fail.unlang +++ b/src/tests/modules/redis/cluster_node_fail.unlang @@ -3,6 +3,7 @@ # string redismaster string redisreplica +string takeoverresult $INCLUDE cluster_reset.inc @@ -26,7 +27,11 @@ if (%redis(@%redis.node(b, 0), DEBUG, SEGFAULT)) { } # Forcefully failover the slave for that node -if (!(%redis(@%{redisreplica}, CLUSTER, FAILOVER, TAKEOVER) == 'OK')) { +# If the failover has happened automatically, then the result is '' +# which sometimes happens when running tests with sanitizers, due to +# slowness introduced by the sanitizers. +&takeoverresult = %redis(@%{redisreplica}, CLUSTER, FAILOVER, TAKEOVER) +if !((&takeoverresult == 'OK') || (&takeoverresult == '')) { test_fail }