mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 04:10:24 +00:00
Skip ws_SUITE:unlimited_connections when ulimit -n is too low
This commit is contained in:
parent
962d715ad4
commit
3f37985d2c
1 changed files with 8 additions and 0 deletions
|
@ -77,6 +77,14 @@ init_dispatch() ->
|
|||
unlimited_connections(Config) ->
|
||||
doc("Websocket connections are not limited. The connections "
|
||||
"are removed from the count after the handshake completes."),
|
||||
case list_to_integer(os:cmd("printf `ulimit -n`")) of
|
||||
Limit when Limit > 6100 ->
|
||||
do_unlimited_connections(Config);
|
||||
_ ->
|
||||
{skip, "`ulimit -n` reports a limit too low for this test."}
|
||||
end.
|
||||
|
||||
do_unlimited_connections(Config) ->
|
||||
_ = [begin
|
||||
spawn_link(fun() -> do_connect_and_loop(Config) end),
|
||||
timer:sleep(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue