mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Rely on timetrap timeouts for tracer_SUITE
This commit is contained in:
parent
8cba8c3c68
commit
e51ac66728
1 changed files with 3 additions and 28 deletions
|
@ -23,6 +23,9 @@
|
||||||
|
|
||||||
%% ct.
|
%% ct.
|
||||||
|
|
||||||
|
suite() ->
|
||||||
|
[{timetrap, 30000}].
|
||||||
|
|
||||||
%% We initialize trace patterns here. Appropriate would be in
|
%% We initialize trace patterns here. Appropriate would be in
|
||||||
%% init_per_suite/1, but this works just as well.
|
%% init_per_suite/1, but this works just as well.
|
||||||
all() ->
|
all() ->
|
||||||
|
@ -130,8 +133,6 @@ init(Config) ->
|
||||||
receive
|
receive
|
||||||
init ->
|
init ->
|
||||||
ok
|
ok
|
||||||
after 100 ->
|
|
||||||
error(timeout)
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
terminate(Config) ->
|
terminate(Config) ->
|
||||||
|
@ -146,8 +147,6 @@ terminate(Config) ->
|
||||||
receive
|
receive
|
||||||
terminate ->
|
terminate ->
|
||||||
ok
|
ok
|
||||||
after 100 ->
|
|
||||||
error(timeout)
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
state(Config) ->
|
state(Config) ->
|
||||||
|
@ -163,8 +162,6 @@ state(Config) ->
|
||||||
{state, St} ->
|
{state, St} ->
|
||||||
true = St > 0,
|
true = St > 0,
|
||||||
ok
|
ok
|
||||||
after 100 ->
|
|
||||||
error(timeout)
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
empty(Config) ->
|
empty(Config) ->
|
||||||
|
@ -179,8 +176,6 @@ empty(Config) ->
|
||||||
receive
|
receive
|
||||||
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
||||||
ok
|
ok
|
||||||
after 100 ->
|
|
||||||
error(timeout)
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
predicate_true(Config) ->
|
predicate_true(Config) ->
|
||||||
|
@ -195,8 +190,6 @@ predicate_true(Config) ->
|
||||||
receive
|
receive
|
||||||
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
||||||
ok
|
ok
|
||||||
after 100 ->
|
|
||||||
error(timeout)
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
predicate_false(Config) ->
|
predicate_false(Config) ->
|
||||||
|
@ -227,8 +220,6 @@ method(Config) ->
|
||||||
receive
|
receive
|
||||||
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
||||||
ok
|
ok
|
||||||
after 100 ->
|
|
||||||
error(timeout)
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
method_no_match(Config) ->
|
method_no_match(Config) ->
|
||||||
|
@ -259,8 +250,6 @@ host(Config) ->
|
||||||
receive
|
receive
|
||||||
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
||||||
ok
|
ok
|
||||||
after 100 ->
|
|
||||||
error(timeout)
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
host_no_match(Config) ->
|
host_no_match(Config) ->
|
||||||
|
@ -291,8 +280,6 @@ path(Config) ->
|
||||||
receive
|
receive
|
||||||
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
||||||
ok
|
ok
|
||||||
after 100 ->
|
|
||||||
error(timeout)
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
path_no_match(Config) ->
|
path_no_match(Config) ->
|
||||||
|
@ -323,8 +310,6 @@ path_start(Config) ->
|
||||||
receive
|
receive
|
||||||
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
||||||
ok
|
ok
|
||||||
after 100 ->
|
|
||||||
error(timeout)
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
path_start_no_match(Config) ->
|
path_start_no_match(Config) ->
|
||||||
|
@ -355,8 +340,6 @@ header_defined(Config) ->
|
||||||
receive
|
receive
|
||||||
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
||||||
ok
|
ok
|
||||||
after 100 ->
|
|
||||||
error(timeout)
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
header_defined_no_match(Config) ->
|
header_defined_no_match(Config) ->
|
||||||
|
@ -387,8 +370,6 @@ header_value(Config) ->
|
||||||
receive
|
receive
|
||||||
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
||||||
ok
|
ok
|
||||||
after 100 ->
|
|
||||||
error(timeout)
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
header_value_no_match(Config) ->
|
header_value_no_match(Config) ->
|
||||||
|
@ -419,8 +400,6 @@ peer_ip(Config) ->
|
||||||
receive
|
receive
|
||||||
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
||||||
ok
|
ok
|
||||||
after 100 ->
|
|
||||||
error(timeout)
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
peer_ip_no_match(Config) ->
|
peer_ip_no_match(Config) ->
|
||||||
|
@ -487,8 +466,6 @@ two_matching_requests(Config) ->
|
||||||
receive
|
receive
|
||||||
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
||||||
ok
|
ok
|
||||||
after 100 ->
|
|
||||||
error(timeout)
|
|
||||||
end,
|
end,
|
||||||
%% Perform a second GET request on the same connection.
|
%% Perform a second GET request on the same connection.
|
||||||
Ref2 = gun:get(ConnPid, "/", []),
|
Ref2 = gun:get(ConnPid, "/", []),
|
||||||
|
@ -497,7 +474,5 @@ two_matching_requests(Config) ->
|
||||||
receive
|
receive
|
||||||
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
{trace_ts, _, call, {cowboy_req, reply, [200, _, _, _]}, _} ->
|
||||||
ok
|
ok
|
||||||
after 100 ->
|
|
||||||
error(timeout)
|
|
||||||
end,
|
end,
|
||||||
gun:close(ConnPid).
|
gun:close(ConnPid).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue