diff options
author | Ali Sabil <[email protected]> | 2013-06-13 11:47:24 +0200 |
---|---|---|
committer | Ali Sabil <[email protected]> | 2013-06-13 11:47:24 +0200 |
commit | 240533939c9ecd8f07c9f5a6619182bb8e772a86 (patch) | |
tree | bb8cca445a910ffd65d6e3e194a9c20535be4214 /test/http_SUITE.erl | |
parent | 809dc32339aedbee63c64e23461c60e207ee53a7 (diff) | |
download | cowboy-240533939c9ecd8f07c9f5a6619182bb8e772a86.tar.gz cowboy-240533939c9ecd8f07c9f5a6619182bb8e772a86.tar.bz2 cowboy-240533939c9ecd8f07c9f5a6619182bb8e772a86.zip |
Use ct_helper for retrieving the loopack interface MTU
Diffstat (limited to 'test/http_SUITE.erl')
-rw-r--r-- | test/http_SUITE.erl | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/test/http_SUITE.erl b/test/http_SUITE.erl index 01da7b2..39b30db 100644 --- a/test/http_SUITE.erl +++ b/test/http_SUITE.erl @@ -420,15 +420,6 @@ body_to_chunks(ChunkSize, Body, Acc) -> body_to_chunks(ChunkSize, Rest, [<< ChunkSizeBin/binary, "\r\n", Chunk/binary, "\r\n" >>|Acc]). -get_mtu() -> - {ok, Interfaces} = inet:getiflist(), - [LocalInterface | _ ] = lists:filter(fun(Interface) -> - {ok, [{flags, Flags}]} = inet:ifget(Interface, [flags]), - lists:member(loopback, Flags) - end, Interfaces), - {ok, [{mtu, MTU}]} = inet:ifget(LocalInterface, [mtu]), - MTU. - %% Tests. check_raw_status(Config) -> @@ -526,7 +517,7 @@ chunked_response(Config) -> %% Check if sending requests whose size is around the MTU breaks something. echo_body(Config) -> Client = ?config(client, Config), - MTU = get_mtu(), + MTU = ct_helper:get_loopback_mtu(), _ = [begin Body = list_to_binary(lists:duplicate(Size, $a)), {ok, Client2} = cowboy_client:request(<<"POST">>, |