Skip to content

Commit

Permalink
Run http_SUITE:graceful_shutdown_listener separately
Browse files Browse the repository at this point in the history
To avoid intermittent errors that are more likely as more
tests are calling cowboy:stop_listener.
  • Loading branch information
essen committed Feb 10, 2025
1 parent 053e233 commit 882a4f4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/http_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,16 @@
-import(cowboy_test, [raw_recv/3]).
-import(cowboy_test, [raw_expect_recv/2]).

all() -> [{group, clear}].

groups() -> [{clear, [parallel], ct_helper:all(?MODULE)}].
all() ->
[{group, clear_no_parallel}, {group, clear}].

groups() ->
[
%% cowboy:stop_listener can be slow when called many times
%% in parallel so we must run this test separately from the others.
{clear_no_parallel, [], [graceful_shutdown_listener]},
{clear, [parallel], ct_helper:all(?MODULE) -- [graceful_shutdown_listener]}
].

init_per_group(Name, Config) ->
cowboy_test:init_http(Name, #{
Expand Down

0 comments on commit 882a4f4

Please sign in to comment.