aboutsummaryrefslogtreecommitdiffstats
path: root/test/http2_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/http2_SUITE.erl')
-rw-r--r--test/http2_SUITE.erl15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/http2_SUITE.erl b/test/http2_SUITE.erl
index b71b2c9..ba95173 100644
--- a/test/http2_SUITE.erl
+++ b/test/http2_SUITE.erl
@@ -18,6 +18,7 @@
-import(ct_helper, [config/2]).
-import(ct_helper, [doc/1]).
+-import(ct_helper, [get_remote_pid_tcp/1]).
-import(ct_helper, [name/0]).
-import(cowboy_test, [gun_open/1]).
@@ -131,10 +132,11 @@ preface_timeout_infinity(Config) ->
env => #{dispatch => cowboy_router:compile(init_routes(Config))},
preface_timeout => infinity
},
- {ok, Pid} = cowboy:start_clear(name(), [{port, 0}], ProtoOpts),
- Ref = erlang:monitor(process, Pid),
+ {ok, _} = cowboy:start_clear(name(), [{port, 0}], ProtoOpts),
Port = ranch:get_port(name()),
- {ok, _} = do_handshake([{port, Port}|Config]),
+ {ok, Socket} = do_handshake([{port, Port}|Config]),
+ Pid = get_remote_pid_tcp(Socket),
+ Ref = erlang:monitor(process, Pid),
receive
{'DOWN', Ref, process, Pid, Reason} ->
error(Reason)
@@ -166,10 +168,11 @@ settings_timeout_infinity(Config) ->
env => #{dispatch => cowboy_router:compile(init_routes(Config))},
settings_timeout => infinity
},
- {ok, Pid} = cowboy:start_clear(name(), [{port, 0}], ProtoOpts),
- Ref = erlang:monitor(process, Pid),
+ {ok, _} = cowboy:start_clear(name(), [{port, 0}], ProtoOpts),
Port = ranch:get_port(name()),
- {ok, _} = do_handshake([{port, Port}|Config]),
+ {ok, Socket} = do_handshake([{port, Port}|Config]),
+ Pid = get_remote_pid_tcp(Socket),
+ Ref = erlang:monitor(process, Pid),
receive
{'DOWN', Ref, process, Pid, Reason} ->
error(Reason)