diff options
author | Loïc Hoguin <[email protected]> | 2020-04-02 17:36:03 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2020-04-02 17:36:03 +0200 |
commit | 4274f077a656242659112f01c25cece32ddcb487 (patch) | |
tree | fa3b25613b65fd27ddd117657889a55823da91d2 | |
parent | 3f37985d2c6b399796f53b8057beb9680514a25f (diff) | |
download | cowboy-4274f077a656242659112f01c25cece32ddcb487.tar.gz cowboy-4274f077a656242659112f01c25cece32ddcb487.tar.bz2 cowboy-4274f077a656242659112f01c25cece32ddcb487.zip |
Disable ws_SUITE:unlimited_connections on Windows
-rw-r--r-- | test/ws_SUITE.erl | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/test/ws_SUITE.erl b/test/ws_SUITE.erl index 0e940d6..9abeaca 100644 --- a/test/ws_SUITE.erl +++ b/test/ws_SUITE.erl @@ -77,11 +77,17 @@ 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."} + case os:type() of + {win32, _} -> + {skip, "Tests that use too many sockets are disabled on Windows " + "to prevent intermittent failures."}; + {unix, _} -> + 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 end. do_unlimited_connections(Config) -> |