diff options
author | yoav-steinberg <yoav@monfort.co.il> | 2021-11-15 11:07:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-15 11:07:43 +0200 |
commit | e968d9ac5846deac81e5f5288c23fef7a33d2dc2 (patch) | |
tree | a75973a2fea84cd53fbe09c990ce32b561c0c22d /tests/support | |
parent | 174eedce44946ba58426ad45fc206977a564d1d2 (diff) | |
download | redis-e968d9ac5846deac81e5f5288c23fef7a33d2dc2.tar.gz |
Connection leak in external tests. (#9777)
Two issues:
1. In many tests we simply forgot to close the connections we created, which doesn't matter for normal tests where the server is killed, but creates a leak on external server tests.
2. When calling `start_server` on external test we create a fresh connection instead of really starting a new server, but never clean it at the end.
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 d91d60730..4c63d7b3a 100644 --- a/tests/support/server.tcl +++ b/tests/support/server.tcl @@ -378,7 +378,11 @@ proc run_external_server_test {code overrides} { r config set $param $val } - lpop ::servers + set srv [lpop ::servers] + + if {[dict exists $srv "client"]} { + [dict get $srv "client"] close + } } proc start_server {options {code undefined}} { |