diff options
author | Oran Agra <oran@redislabs.com> | 2021-12-19 17:41:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-19 17:41:51 +0200 |
commit | 6add1b7217458dab90b2458e4bac3fa9a2c15e1b (patch) | |
tree | 3d5c1656b78035bbe2fae44a121fb14611bbe34a /tests/support/test.tcl | |
parent | ae2f5b7b2e007e4bb7108407d7d41972312d0766 (diff) | |
download | redis-6add1b7217458dab90b2458e4bac3fa9a2c15e1b.tar.gz |
Add external test that runs without debug command (#9964)
- add needs:debug flag for some tests
- disable "save" in external tests (speedup?)
- use debug_digest proc instead of debug command directly so it can be skipped
- use OBJECT ENCODING instead of DEBUG OBJECT to get encoding
- add a proc for OBJECT REFCOUNT so it can be skipped
- move a bunch of tests in latency_monitor tests to happen later so that latency monitor has some values in it
- add missing close_replication_stream calls
- make sure to close the temp client if DEBUG LOG fails
Diffstat (limited to 'tests/support/test.tcl')
-rw-r--r-- | tests/support/test.tcl | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/support/test.tcl b/tests/support/test.tcl index 118300dbc..a4fec1564 100644 --- a/tests/support/test.tcl +++ b/tests/support/test.tcl @@ -88,14 +88,19 @@ proc assert_encoding {enc key} { if {$::ignoreencoding} { return } - set dbg [r debug object $key] - assert_match "* encoding:$enc *" $dbg + set val [r object encoding $key] + assert_match $enc $val } proc assert_type {type key} { assert_equal $type [r type $key] } +proc assert_refcount {ref key} { + set val [r object refcount $key] + assert_equal $ref $val +} + # Wait for the specified condition to be true, with the specified number of # max retries and delay between retries. Otherwise the 'elsescript' is # executed. @@ -159,7 +164,9 @@ proc test {name code {okpattern undefined} {tags {}}} { if {$::external} { catch { set r [redis [srv 0 host] [srv 0 port] 0 $::tls] - $r debug log "### Starting test $::cur_test" + catch { + $r debug log "### Starting test $::cur_test" + } $r close } } else { |