Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 89 additions & 89 deletions .github/workflows/daily.yml

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions tests/instances.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set ::dont_clean 0
set ::simulate_error 0
set ::failed 0
set ::failed_tests {}
set ::failures_json_file ""
set ::failures_output_file ""
set ::sentinel_instances {}
set ::valkey_instances {}
set ::global_config {}
Expand Down Expand Up @@ -314,8 +314,8 @@ proc parse_options {} {
set ::stop_on_failure 1
} elseif {$opt eq {--loop}} {
set ::loop 1
} elseif {$opt eq {--failures-json}} {
set ::failures_json_file [file normalize "../../../$val"]
} elseif {$opt eq {--failures-output}} {
set ::failures_output_file [file normalize "../../../$val"]
incr j
} elseif {$opt eq {--log-req-res}} {
set ::log_req_res 1
Expand All @@ -335,7 +335,7 @@ proc parse_options {} {
puts "--fast-fail Exit immediately once the first test fails."
puts "--stop Blocks once the first test fails."
puts "--loop Execute the specified set of tests forever."
puts "--failures-json <path> Write test failures to the specified JSON file."
puts "--failures-output <path> Write test failures to the specified JSON file."
puts "--help Shows this help."
exit 0
} else {
Expand Down Expand Up @@ -529,7 +529,7 @@ while 1 {
}

proc write_test_failures {} {
if {$::failures_json_file eq ""} {
if {$::failures_output_file eq ""} {
return
}

Expand All @@ -546,11 +546,11 @@ proc write_test_failures {} {
lappend failures "\{\"test_name\":\"$test_name\",\"test_file\":\"$test_file\",\"status\":\"err\",\"error\":\"$error_msg\"\}"
}

set outdir [file dirname $::failures_json_file]
set outdir [file dirname $::failures_output_file]
if {$outdir ne "."} {
file mkdir $outdir
}
set fp [open $::failures_json_file w]
set fp [open $::failures_output_file w]
puts $fp "\[[join $failures ","]\]"
close $fp
}
Expand Down
2 changes: 1 addition & 1 deletion tests/sentinel/tests/00-base.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test "SENTINEL MYID return the sentinel instance ID" {
test "SENTINEL INFO CACHE returns the cached info" {
set res [S 0 SENTINEL INFO-CACHE mymaster]
assert_morethan_equal [llength $res] 2
assert_equal "mymaster" [lindex $res 0]
assert_equal "mymasterr" [lindex $res 0]

set res [lindex $res 1]
assert_morethan_equal [llength $res] 2
Expand Down
14 changes: 7 additions & 7 deletions tests/test_helper.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ set ::file ""; # If set, runs only the tests in this comma separated list
set ::curfile ""; # Hold the filename of the current suite
set ::accurate 0; # If true runs fuzz tests with more iterations
set ::force_failure 0
set ::failures_json_file ""; # If set, write failures JSON to this path
set ::failures_output_file ""; # If set, write failures JSON to this path
set ::timeout 1200; # 20 minutes without progresses will quit the test.
set ::last_progress [clock seconds]
set ::active_servers {} ; # Pids of active server instances.
Expand Down Expand Up @@ -612,7 +612,7 @@ proc print_test_summary {} {
}

proc write_test_failures {} {
if {$::failures_json_file eq ""} {
if {$::failures_output_file eq ""} {
return
}

Expand Down Expand Up @@ -643,11 +643,11 @@ proc write_test_failures {} {
lappend failures "\{\"test_name\":\"$test_name\",\"test_file\":\"$test_file\",\"status\":\"$status\",\"error\":\"$error_msg\"\}"
}

set outdir [file dirname $::failures_json_file]
set outdir [file dirname $::failures_output_file]
if {$outdir ne "."} {
file mkdir $outdir
}
set fp [open $::failures_json_file w]
set fp [open $::failures_output_file w]
puts $fp "\[[join $failures ","]\]"
close $fp
}
Expand Down Expand Up @@ -732,7 +732,7 @@ proc print_help_screen {} {
"--clients <num> Number of test clients (default 16)."
"--timeout <sec> Test timeout in seconds (default 20 min)."
"--force-failure Force the execution of a test that always fails."
"--failures-json <path>"
"--failures-output <path>"
" Write test failures to the specified JSON file."
"--config <k> <v> Extra config file argument."
"--skipfile <file> Name of a file containing test names or regexp patterns (if"
Expand Down Expand Up @@ -857,8 +857,8 @@ for {set j 0} {$j < [llength $argv]} {incr j} {
set ::accurate 1
} elseif {$opt eq {--force-failure}} {
set ::force_failure 1
} elseif {$opt eq {--failures-json}} {
set ::failures_json_file $arg
} elseif {$opt eq {--failures-output}} {
set ::failures_output_file $arg
incr j
} elseif {$opt eq {--single}} {
foreach unit [expand_unit_spec $arg] {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/cluster/cli.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ start_multiple_servers 3 [list overrides $base_conf] {
127.0.0.1:[srv -2 port]

wait_for_condition 1000 50 {
[CI 1 cluster_state] eq {ok} &&
[CI 1 cluster_state] eq {okk} &&
[CI 2 cluster_state] eq {ok}
} else {
fail "Cluster doesn't stabilize"
Expand Down
17 changes: 17 additions & 0 deletions tests/unit/dummy-flaky.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
start_server {tags {"dummy"}} {
test "dummy-flaky - basic SET and GET" {
r SET mykey myvalue
assert_equal [r GET mykey] "myvalue"
}

test "dummy-flaky - intentional failure" {
r SET mykey myvalue
assert_equal [r GET mykey] "wrongvalue"
}

test "dummy-flaky - another passing test" {
r SET counter 0
r INCR counter
assert_equal [r GET counter] "1"
}
}
2 changes: 1 addition & 1 deletion tests/unit/moduleapi/auth.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ start_server {tags {"modules"}} {

# Verify returned id is the same as our current id and
# we are authenticated with the specified user
assert_equal [r acl whoami] "global"
assert_equal [r acl whoami] "globall"
}

test {De-authenticating clients is tracked and kills clients} {
Expand Down
Loading