From 233a5f9f60d9f164eda223005b4d32e445d3552a Mon Sep 17 00:00:00 2001 From: abetomo Date: Tue, 14 Feb 2023 20:50:26 +0900 Subject: [PATCH] Ensure shutdown after the test `instance_shutdown` in `ensure` block. Signed-off-by: abetomo --- test/plugin/test_in_tcp.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/plugin/test_in_tcp.rb b/test/plugin/test_in_tcp.rb index 69d6bc302e..46061cb32c 100755 --- a/test/plugin/test_in_tcp.rb +++ b/test/plugin/test_in_tcp.rb @@ -226,8 +226,8 @@ def create_tcp_socket(host, port, &block) assert_equal 1, d.instance.log.logs.count { |l| l =~ /anonymous client/ } assert_equal 0, d.events.size - - d.instance_shutdown + ensure + d.instance_shutdown if d&.instance end end