diff options
author | chenyang8094 <chenyang8094@users.noreply.github.com> | 2022-01-25 04:31:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-24 22:31:35 +0200 |
commit | fa600496482dcfdbf4b5af7c27b7a2eda02ac586 (patch) | |
tree | 225e87b9243dd1216b8d3dd8f3c042db87f78eb2 /tests/support | |
parent | 495ac8b79a4566abd05e201f06334cdd570258ef (diff) | |
download | redis-fa600496482dcfdbf4b5af7c27b7a2eda02ac586.tar.gz |
Fix EVAL timeout test failed on freebsd (#10098)
* Refactor EVAL timeout test
* since the test used r config set appendonly yes which generates a rewrite, it missed it's purpose
* Fix the bug that start_server returns before redis starts ready, which affects when multiple tests share the same dir.
* Elapsed time tracking no loner needed
Co-authored-by: Oran Agra <oran@redislabs.com>
Diffstat (limited to 'tests/support')
-rw-r--r-- | tests/support/server.tcl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/support/server.tcl b/tests/support/server.tcl index a65fa8d7e..b06bd73ba 100644 --- a/tests/support/server.tcl +++ b/tests/support/server.tcl @@ -505,6 +505,10 @@ proc start_server {options {code undefined}} { close $fd } + # We may have a stdout left over from the previous tests, so we need + # to get the current count of ready logs + set previous_ready_count [count_message_lines $stdout "Ready to accept"] + # We need a loop here to retry with different ports. set server_started 0 while {$server_started == 0} { @@ -585,7 +589,7 @@ proc start_server {options {code undefined}} { while 1 { # check that the server actually started and is ready for connections - if {[count_message_lines $stdout "Ready to accept"] > 0} { + if {[count_message_lines $stdout "Ready to accept"] > $previous_ready_count} { break } after 10 |