Skip to content

Commit

Permalink
Include second solo test execution in total test count (valkey-io#1071)
Browse files Browse the repository at this point in the history
This change counts both solo test executions to give an accurate total number of tests being run.

---------

Signed-off-by: Shivshankar-Reddy <[email protected]>
  • Loading branch information
Shivshankar-Reddy authored Oct 4, 2024
1 parent 6a8540c commit 1c22680
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_helper.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ set ::ignoredigest 0
set ::large_memory 0
set ::log_req_res 0
set ::force_resp3 0
set ::solo_tests_count 0

# Set to 1 when we are running in client mode. The server test uses a
# server-client model to run tests simultaneously. The server instance
Expand Down Expand Up @@ -373,9 +374,10 @@ proc read_from_test_client fd {
signal_idle_client $fd
} elseif {$status eq {done}} {
set elapsed [expr {[clock seconds]-$::clients_start_time($fd)}]
set all_tests_count [llength $::all_tests]
set all_tests_count [expr {[llength $::all_tests]+$::solo_tests_count}]
set running_tests_count [expr {[llength $::active_clients]-1}]
set completed_tests_count [expr {$::next_test-$running_tests_count}]
set completed_solo_tests_count [expr {$::solo_tests_count-[llength $::run_solo_tests]}]
set completed_tests_count [expr {$::next_test-$running_tests_count+$completed_solo_tests_count}]
puts "\[$completed_tests_count/$all_tests_count [colorstr yellow $status]\]: $data ($elapsed seconds)"
lappend ::clients_time_history $elapsed $data
signal_idle_client $fd
Expand Down Expand Up @@ -427,6 +429,7 @@ proc read_from_test_client fd {
set ::active_clients_task($fd) "(KILLED SERVER) pid:$data"
} elseif {$status eq {run_solo}} {
lappend ::run_solo_tests $data
incr ::solo_tests_count
} else {
if {!$::quiet} {
puts "\[$status\]: $data"
Expand Down

0 comments on commit 1c22680

Please sign in to comment.