mirror of
http://github.com/valkey-io/valkey
synced 2024-11-23 20:00:00 +00:00
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 <shiva.sheri.github@gmail.com>
This commit is contained in:
parent
f0e1edc273
commit
669f1d3014
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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]} {
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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 {}
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user