From e968d9ac5846deac81e5f5288c23fef7a33d2dc2 Mon Sep 17 00:00:00 2001 From: yoav-steinberg Date: Mon, 15 Nov 2021 11:07:43 +0200 Subject: 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. --- tests/support/server.tcl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/support') 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}} { -- cgit v1.2.1