aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Uhlig <[email protected]>2022-01-26 16:38:34 +0100
committerLoïc Hoguin <[email protected]>2022-04-28 18:02:23 +0200
commit48476b475b4fed098ba75ab7574d3b451231dede (patch)
tree649594e554a531511cbd5fd397d7cba46be92306
parent6d752383bec3d8c543aea0220b5a8cb28dab7852 (diff)
downloadranch-48476b475b4fed098ba75ab7574d3b451231dede.tar.gz
ranch-48476b475b4fed098ba75ab7574d3b451231dede.tar.bz2
ranch-48476b475b4fed098ba75ab7574d3b451231dede.zip
Fix leaking listeners after tests
-rw-r--r--test/acceptor_SUITE.erl8
1 files changed, 8 insertions, 0 deletions
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(_) ->