From 9437bb0139cd02f2ae417954b5c149d0a8241dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sat, 20 Jun 2020 10:36:39 +0200 Subject: Fix Dialyzer warnings in the new tests --- test/ranch_concuerror.erl | 5 ++++- test/ranch_erlang_transport.erl | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/ranch_concuerror.erl b/test/ranch_concuerror.erl index 0347fce..d363e53 100644 --- a/test/ranch_concuerror.erl +++ b/test/ranch_concuerror.erl @@ -27,9 +27,10 @@ %% Convenience functions. do_start() -> - {ok, SupPid} = ranch_app:start(temporary, []), + {ok, SupPid} = ranch_app:start(normal, []), SupPid. +-spec do_stop(pid()) -> no_return(). do_stop(SupPid) -> exit(SupPid, shutdown), %% We make sure that SupPid terminated before the test ends, @@ -39,6 +40,7 @@ do_stop(SupPid) -> %% Tests. +-spec start_stop() -> no_return(). start_stop() -> %% Start a listener then stop it. SupPid = do_start(), @@ -68,6 +70,7 @@ start_stop() -> % ok = ranch:stop_listener(?FUNCTION_NAME), % do_stop(SupPid). +-spec info() -> no_return(). info() -> %% Ensure we can call ranch:info/1 after starting a listener. SupPid = do_start(), diff --git a/test/ranch_erlang_transport.erl b/test/ranch_erlang_transport.erl index 914d91a..32ff036 100644 --- a/test/ranch_erlang_transport.erl +++ b/test/ranch_erlang_transport.erl @@ -61,7 +61,7 @@ messages() -> {erlang, erlang_closed, erlang_error, erlang_passive}. listen(_TransOpts) -> {ok, make_ref()}. --spec accept(reference(), timeout()) -> {ok, reference()}. +-spec accept(reference(), timeout()) -> no_return(). % {ok, reference()}. accept(_LSocket, _Timeout) -> receive after infinity -> {ok, make_ref()} end. -- cgit v1.2.3