aboutsummaryrefslogtreecommitdiffstats
path: root/test/req_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-09-15 21:34:14 +0200
committerLoïc Hoguin <[email protected]>2019-09-15 21:34:14 +0200
commitda5487b5a3dbbf5fa4e22d08268fb06647100d23 (patch)
treefd16dd5554d417f333fb01aa2cbdd7bfd31c044a /test/req_SUITE.erl
parent2888e9e6ef8b3f234a118eeecaadaa7315ce7e62 (diff)
downloadcowboy-da5487b5a3dbbf5fa4e22d08268fb06647100d23.tar.gz
cowboy-da5487b5a3dbbf5fa4e22d08268fb06647100d23.tar.bz2
cowboy-da5487b5a3dbbf5fa4e22d08268fb06647100d23.zip
Skip req_SUITE:read_body_mtu on Windows
On Windows the loopback MTU seems to be set to 0xFFFFFFFF (basically no limit) which makes the test irrelevant.
Diffstat (limited to 'test/req_SUITE.erl')
-rw-r--r--test/req_SUITE.erl19
1 files changed, 12 insertions, 7 deletions
diff --git a/test/req_SUITE.erl b/test/req_SUITE.erl
index f58154f..6fc2e12 100644
--- a/test/req_SUITE.erl
+++ b/test/req_SUITE.erl
@@ -452,13 +452,18 @@ read_body(Config) ->
ok.
read_body_mtu(Config) ->
- doc("Request body whose sizes are around the MTU."),
- MTU = ct_helper:get_loopback_mtu(),
- _ = [begin
- Body = <<0:Size/unit:8>>,
- Body = do_body("POST", "/full/read_body", [], Body, Config)
- end || Size <- lists:seq(MTU - 10, MTU + 10)],
- ok.
+ case os:type() of
+ {win32, _} ->
+ {skip, "Loopback MTU size is 0xFFFFFFFF on Windows."};
+ {unix, _} ->
+ doc("Request body whose sizes are around the MTU."),
+ MTU = ct_helper:get_loopback_mtu(),
+ _ = [begin
+ Body = <<0:Size/unit:8>>,
+ Body = do_body("POST", "/full/read_body", [], Body, Config)
+ end || Size <- lists:seq(MTU - 10, MTU + 10)],
+ ok
+ end.
read_body_period(Config) ->
doc("Read the request body for at most 2 seconds."),