From 669f1d3014fc7fd7184cd2d81bb63866cc198417 Mon Sep 17 00:00:00 2001 From: Shivshankar Date: Tue, 23 Apr 2024 13:51:53 -0400 Subject: [PATCH] redisbenchmark to valkeybenchmark in test directory and some test name rename. (#347) This pr covers following chnages. 1. redisbenchmark to valkeybenchmark in test directory 2. Removed redis from some test's title and changed the name accordingly. 3. Updated test suite name and redis-server to valkey readme in test directory. --------- Signed-off-by: Shivshankar-Reddy --- tests/README.md | 6 +++--- tests/integration/aof.tcl | 2 +- tests/integration/valkey-benchmark.tcl | 26 +++++++++++++------------- tests/support/benchmark.tcl | 14 +++++++------- tests/unit/expire.tcl | 6 +++--- tests/unit/hyperloglog.tcl | 2 +- tests/unit/scripting.tcl | 2 +- 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/tests/README.md b/tests/README.md index 1aa98dc9f..8165f832c 100644 --- a/tests/README.md +++ b/tests/README.md @@ -1,8 +1,8 @@ -Redis Test Suite -================ +Valkey Test Suite +================= The normal execution mode of the test suite involves starting and manipulating -local `redis-server` instances, inspecting process state, log files, etc. +local `valkey-server` instances, inspecting process state, log files, etc. The test suite also supports execution against an external server, which is enabled using the `--host` and `--port` parameters. When executing against an diff --git a/tests/integration/aof.tcl b/tests/integration/aof.tcl index 81b7f2b63..6a074fbef 100644 --- a/tests/integration/aof.tcl +++ b/tests/integration/aof.tcl @@ -202,7 +202,7 @@ tags {"aof external:skip"} { } start_server {overrides {appendonly {yes}}} { - test {Redis should not try to convert DEL into EXPIREAT for EXPIRE -1} { + test {Server should not try to convert DEL into EXPIREAT for EXPIRE -1} { r set x 10 r expire x -1 } diff --git a/tests/integration/valkey-benchmark.tcl b/tests/integration/valkey-benchmark.tcl index aee5f8f29..74d26b757 100644 --- a/tests/integration/valkey-benchmark.tcl +++ b/tests/integration/valkey-benchmark.tcl @@ -32,26 +32,26 @@ tags {"benchmark network external:skip logreqres:skip"} { r select 0 test {benchmark: set,get} { - set cmd [redisbenchmark $master_host $master_port "-c 5 -n 10 -t set,get"] + set cmd [valkeybenchmark $master_host $master_port "-c 5 -n 10 -t set,get"] common_bench_setup $cmd default_set_get_checks } test {benchmark: connecting using URI set,get} { - set cmd [redisbenchmarkuri $master_host $master_port "-c 5 -n 10 -t set,get"] + set cmd [valkeybenchmarkuri $master_host $master_port "-c 5 -n 10 -t set,get"] common_bench_setup $cmd default_set_get_checks } test {benchmark: connecting using URI with authentication set,get} { r config set masterauth pass - set cmd [redisbenchmarkuriuserpass $master_host $master_port "default" pass "-c 5 -n 10 -t set,get"] + set cmd [valkeybenchmarkuriuserpass $master_host $master_port "default" pass "-c 5 -n 10 -t set,get"] common_bench_setup $cmd default_set_get_checks } test {benchmark: full test suite} { - set cmd [redisbenchmark $master_host $master_port "-c 10 -n 100"] + set cmd [valkeybenchmark $master_host $master_port "-c 10 -n 100"] common_bench_setup $cmd # ping total calls are 2*issued commands per test due to PING_INLINE and PING_MBULK @@ -76,7 +76,7 @@ tags {"benchmark network external:skip logreqres:skip"} { } test {benchmark: multi-thread set,get} { - set cmd [redisbenchmark $master_host $master_port "--threads 10 -c 5 -n 10 -t set,get"] + set cmd [valkeybenchmark $master_host $master_port "--threads 10 -c 5 -n 10 -t set,get"] common_bench_setup $cmd default_set_get_checks @@ -85,7 +85,7 @@ tags {"benchmark network external:skip logreqres:skip"} { } test {benchmark: pipelined full set,get} { - set cmd [redisbenchmark $master_host $master_port "-P 5 -c 10 -n 10010 -t set,get"] + set cmd [valkeybenchmark $master_host $master_port "-P 5 -c 10 -n 10010 -t set,get"] common_bench_setup $cmd assert_match {*calls=10010,*} [cmdstat set] assert_match {*calls=10010,*} [cmdstat get] @@ -97,7 +97,7 @@ tags {"benchmark network external:skip logreqres:skip"} { } test {benchmark: arbitrary command} { - set cmd [redisbenchmark $master_host $master_port "-c 5 -n 150 INCRBYFLOAT mykey 10.0"] + set cmd [valkeybenchmark $master_host $master_port "-c 5 -n 150 INCRBYFLOAT mykey 10.0"] common_bench_setup $cmd assert_match {*calls=150,*} [cmdstat incrbyfloat] # assert one of the non benchmarked commands is not present @@ -108,7 +108,7 @@ tags {"benchmark network external:skip logreqres:skip"} { } test {benchmark: keyspace length} { - set cmd [redisbenchmark $master_host $master_port "-r 50 -t set -n 1000"] + set cmd [valkeybenchmark $master_host $master_port "-r 50 -t set -n 1000"] common_bench_setup $cmd assert_match {*calls=1000,*} [cmdstat set] # assert one of the non benchmarked commands is not present @@ -119,7 +119,7 @@ tags {"benchmark network external:skip logreqres:skip"} { } test {benchmark: clients idle mode should return error when reached maxclients limit} { - set cmd [redisbenchmark $master_host $master_port "-c 10 -I"] + set cmd [valkeybenchmark $master_host $master_port "-c 10 -I"] set original_maxclients [lindex [r config get maxclients] 1] r config set maxclients 5 catch { exec {*}$cmd } error @@ -128,7 +128,7 @@ tags {"benchmark network external:skip logreqres:skip"} { } test {benchmark: read last argument from stdin} { - set base_cmd [redisbenchmark $master_host $master_port "-x -n 10 set key"] + set base_cmd [valkeybenchmark $master_host $master_port "-x -n 10 set key"] set cmd "printf arg | $base_cmd" common_bench_setup $cmd r get key @@ -137,7 +137,7 @@ tags {"benchmark network external:skip logreqres:skip"} { # tls specific tests if {$::tls} { test {benchmark: specific tls-ciphers} { - set cmd [redisbenchmark $master_host $master_port "-r 50 -t set -n 1000 --tls-ciphers \"DEFAULT:-AES128-SHA256\""] + set cmd [valkeybenchmark $master_host $master_port "-r 50 -t set -n 1000 --tls-ciphers \"DEFAULT:-AES128-SHA256\""] common_bench_setup $cmd assert_match {*calls=1000,*} [cmdstat set] # assert one of the non benchmarked commands is not present @@ -146,7 +146,7 @@ tags {"benchmark network external:skip logreqres:skip"} { test {benchmark: tls connecting using URI with authentication set,get} { r config set masterauth pass - set cmd [redisbenchmarkuriuserpass $master_host $master_port "default" pass "-c 5 -n 10 -t set,get"] + set cmd [valkeybenchmarkuriuserpass $master_host $master_port "default" pass "-c 5 -n 10 -t set,get"] common_bench_setup $cmd default_set_get_checks } @@ -155,7 +155,7 @@ tags {"benchmark network external:skip logreqres:skip"} { r flushall r config resetstat set ciphersuites_supported 1 - set cmd [redisbenchmark $master_host $master_port "-r 50 -t set -n 1000 --tls-ciphersuites \"TLS_AES_128_GCM_SHA256\""] + set cmd [valkeybenchmark $master_host $master_port "-r 50 -t set -n 1000 --tls-ciphersuites \"TLS_AES_128_GCM_SHA256\""] if {[catch { exec {*}$cmd } error]} { set first_line [lindex [split $error "\n"] 0] if {[string match "*Invalid option*" $first_line]} { diff --git a/tests/support/benchmark.tcl b/tests/support/benchmark.tcl index eedcfa5ce..a68600cbd 100644 --- a/tests/support/benchmark.tcl +++ b/tests/support/benchmark.tcl @@ -1,4 +1,4 @@ -proc redisbenchmark_tls_config {testsdir} { +proc valkeybenchmark_tls_config {testsdir} { set tlsdir [file join $testsdir tls] set cert [file join $tlsdir client.crt] set key [file join $tlsdir client.key] @@ -11,23 +11,23 @@ proc redisbenchmark_tls_config {testsdir} { } } -proc redisbenchmark {host port {opts {}}} { +proc valkeybenchmark {host port {opts {}}} { set cmd [list src/valkey-benchmark -h $host -p $port] - lappend cmd {*}[redisbenchmark_tls_config "tests"] + lappend cmd {*}[valkeybenchmark_tls_config "tests"] lappend cmd {*}$opts return $cmd } -proc redisbenchmarkuri {host port {opts {}}} { +proc valkeybenchmarkuri {host port {opts {}}} { set cmd [list src/valkey-benchmark -u valkey://$host:$port] - lappend cmd {*}[redisbenchmark_tls_config "tests"] + lappend cmd {*}[valkeybenchmark_tls_config "tests"] lappend cmd {*}$opts return $cmd } -proc redisbenchmarkuriuserpass {host port user pass {opts {}}} { +proc valkeybenchmarkuriuserpass {host port user pass {opts {}}} { set cmd [list src/valkey-benchmark -u valkey://$user:$pass@$host:$port] - lappend cmd {*}[redisbenchmark_tls_config "tests"] + lappend cmd {*}[valkeybenchmark_tls_config "tests"] lappend cmd {*}$opts return $cmd } diff --git a/tests/unit/expire.tcl b/tests/unit/expire.tcl index a2554c865..e34686a4e 100644 --- a/tests/unit/expire.tcl +++ b/tests/unit/expire.tcl @@ -181,7 +181,7 @@ start_server {tags {"expire"}} { assert_equal [r pexpiretime x] $abs_expire } - test {Redis should actively expire keys incrementally} { + test {Server should actively expire keys incrementally} { r flushdb r psetex key1 500 a r psetex key2 500 a @@ -197,7 +197,7 @@ start_server {tags {"expire"}} { } } - test {Redis should lazy expire keys} { + test {Server should lazy expire keys} { r flushdb r debug set-active-expire 0 r psetex key1{t} 500 a @@ -768,7 +768,7 @@ start_server {tags {"expire"}} { assert_equal [r EXPIRE none 100 LT] 0 } {} - test {Redis should not propagate the read command on lazy expire} { + test {Server should not propagate the read command on lazy expire} { r debug set-active-expire 0 r flushall ; # Clean up keyspace to avoid interference by keys from other tests r set foo bar PX 1 diff --git a/tests/unit/hyperloglog.tcl b/tests/unit/hyperloglog.tcl index c1e24ceec..c1b3b3a79 100644 --- a/tests/unit/hyperloglog.tcl +++ b/tests/unit/hyperloglog.tcl @@ -146,7 +146,7 @@ start_server {tags {"hll"}} { set e } {*WRONGTYPE*} - test {Fuzzing dense/sparse encoding: Redis should always detect errors} { + test {Fuzzing dense/sparse encoding: Server should always detect errors} { for {set j 0} {$j < 1000} {incr j} { r del hll set items {} diff --git a/tests/unit/scripting.tcl b/tests/unit/scripting.tcl index 86c93678e..126f4eba4 100644 --- a/tests/unit/scripting.tcl +++ b/tests/unit/scripting.tcl @@ -1440,7 +1440,7 @@ start_server {tags {"scripting repl external:skip"}} { set e } {*Invalid*flags*} - test "Test selective replication of certain Redis commands from Lua" { + test "Test selective replication of certain commands from Lua" { r del a b c d run_script { redis.call('set','a','1');