Skip to content

Commit 515bb0e

Browse files
committed
Endurance mode for tests ignore flaky ones
1 parent bc7ea8f commit 515bb0e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/endurance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ jobs:
1818
- name: test-multithread (5X)
1919
run: |
2020
sudo apt-get install -y tcl8.5
21-
./runtest --loopn 5 --config server-threads 3 --clients 5
21+
./runtest --loopn 5 --config server-threads 3 --clients 5 --endurance
2222

tests/test_helper.tcl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ set ::dont_clean 0
104104
set ::wait_server 0
105105
set ::stop_on_failure 0
106106
set ::loop 0
107+
set ::endurance 0
107108
set ::tlsdir "tests/tls"
108109

109110
# Set to 1 when we are running in client mode. The Redis test uses a
@@ -215,9 +216,13 @@ proc s {args} {
215216
# test server, so that the test server will send them again to
216217
# clients once the clients are idle.
217218
proc run_solo {name code} {
218-
if {$::numclients == 1 || $::loop < 0 || $::external} {
219+
if {$::numclients == 1 || $::loop < 0 || $::external || $::endurance} {
219220
# run_solo is not supported in these scenarios, just run the code.
220-
eval $code
221+
if {$::endurance} {
222+
puts "Skipping solo tests because endurance mode is enabled"
223+
} else {
224+
eval $code
225+
}
221226
return
222227
}
223228
send_data_packet $::test_server_fd run_solo [list $name $code]
@@ -620,6 +625,8 @@ for {set j 0} {$j < [llength $argv]} {incr j} {
620625
} elseif {$opt eq {--timeout}} {
621626
set ::timeout $arg
622627
incr j
628+
} elseif {$opt eq {--endurance}} {
629+
set ::endurance 1
623630
} elseif {$opt eq {--help}} {
624631
print_help_screen
625632
exit 0

0 commit comments

Comments
 (0)