From 0918a1be02962e03e3794b1a7205bd71b68dd569 Mon Sep 17 00:00:00 2001 From: Sarthak Aggarwal Date: Tue, 21 Jan 2025 15:28:27 -0800 Subject: [PATCH] skipping db tests in cluster mode Signed-off-by: Sarthak Aggarwal --- tests/unit/introspection.tcl | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/tests/unit/introspection.tcl b/tests/unit/introspection.tcl index f8b4a99cf6..18a66684e3 100644 --- a/tests/unit/introspection.tcl +++ b/tests/unit/introspection.tcl @@ -1327,9 +1327,15 @@ start_server {tags {"introspection"}} { } test {CLIENT LIST can filter by DB number} { - r select 2 - set result [r client list db 2] - assert_match {*db=2*} $result + if {[string match "yes" [r config get cluster-enabled]]} { + skip {DB-specific tests are skipped in cluster mode} + } else { + test {CLIENT LIST can filter by DB} { + r SELECT 2 + set result [r client list db 2] + assert {[string match "*db=2*" $result]} + } + } } test {CLIENT LIST can filter by TOT-NET-IN} { @@ -1374,13 +1380,19 @@ start_server {tags {"introspection"}} { set c1 [valkey_client] set c2 [valkey_client] - $c1 select 2 - $c2 client kill db 2 + if {[string match "yes" [$c1 config get cluster-enabled]]} { + skip {DB-specific tests are skipped in cluster mode} + catch {$c1 close} + catch {$c2 close} + } else { + $c1 select 2 + $c2 client kill db 2 - set result [$c2 client list] - assert {[string match {*db=2*} $result] == 0} + set result [$c2 client list] + assert {[string match {*db=2*} $result] == 0} - catch {$c2 close} + catch {$c2 close} + } } test {CLIENT KILL can filter by TOT-NET-IN} {