From 48476b475b4fed098ba75ab7574d3b451231dede Mon Sep 17 00:00:00 2001 From: Jan Uhlig Date: Wed, 26 Jan 2022 16:38:34 +0100 Subject: Fix leaking listeners after tests --- test/acceptor_SUITE.erl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/acceptor_SUITE.erl b/test/acceptor_SUITE.erl index afb6ffb..16fba78 100644 --- a/test/acceptor_SUITE.erl +++ b/test/acceptor_SUITE.erl @@ -160,6 +160,14 @@ init_per_group(_, Config) -> end_per_group(_, _) -> ok. +init_per_testcase(_, Config) -> + Config. + +end_per_testcase(_, _) -> + %% Stop all listeners that a test case may have left running. + _ = [catch ranch:stop_listener(Name) || Name <- maps:keys(ranch:info())], + ok. + %% misc. misc_bad_transport(_) -> -- cgit v1.2.3