diff --git a/test/http_helper.erl b/test/http_helper.erl index 673910f9da..f527784e0e 100644 --- a/test/http_helper.erl +++ b/test/http_helper.erl @@ -22,8 +22,8 @@ start(Port, Path, HandleFun) -> application:ensure_all_started(cowboy), Dispatch = cowboy_router:compile([{'_', [{Path, http_helper, HandleFun}]}]), {ok, _} = cowboy:start_clear(http_helper_listener, - [{port, Port}, {num_acceptors, 200}], - #{env => #{dispatch => Dispatch}}). + #{socket_opts => [{port, Port}], num_acceptors => 200}, + #{env => #{dispatch => Dispatch}}). stop() -> cowboy:stop_listener(http_helper_listener). diff --git a/test/mim_ct_rest.erl b/test/mim_ct_rest.erl index 96c5b6a03d..78002ccce4 100644 --- a/test/mim_ct_rest.erl +++ b/test/mim_ct_rest.erl @@ -118,7 +118,7 @@ init([BasicAuth]) -> ]), {ok, _} = cowboy:start_clear(tests_listener, - [{port, 12000}, {num_acceptors, 5}], + #{socket_opts => [{port, 12000}], num_acceptors => 5}, #{env => #{dispatch => DispatchEJD}}), {ok, #state{ basic_auth = list_to_binary(BasicAuth) }}.