Skip to content

Commit

Permalink
skipping db tests in cluster mode
Browse files Browse the repository at this point in the history
Signed-off-by: Sarthak Aggarwal <[email protected]>
  • Loading branch information
sarthakaggarwal97 committed Jan 21, 2025
1 parent 3cf9c8c commit 0918a1b
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions tests/unit/introspection.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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} {
Expand Down Expand Up @@ -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} {
Expand Down

0 comments on commit 0918a1b

Please sign in to comment.