diff options
Diffstat (limited to 'test/twitter_SUITE.erl')
-rw-r--r-- | test/twitter_SUITE.erl | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/test/twitter_SUITE.erl b/test/twitter_SUITE.erl index 17086e6..a303440 100644 --- a/test/twitter_SUITE.erl +++ b/test/twitter_SUITE.erl @@ -13,42 +13,11 @@ %% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -module(twitter_SUITE). - --include_lib("common_test/include/ct.hrl"). - -%% ct. --export([all/0]). --export([init_per_suite/1]). --export([end_per_suite/1]). - -%% Tests. --export([spdy/1]). - -%% ct. +-compile(export_all). all() -> [spdy]. -init_per_suite(Config) -> - ok = application:start(ranch), - ok = application:start(crypto), - ok = application:start(cowlib), - ok = application:start(asn1), - ok = application:start(public_key), - ok = application:start(ssl), - ok = application:start(gun), - Config. - -end_per_suite(_) -> - ok = application:stop(gun), - ok = application:stop(ssl), - ok = application:stop(public_key), - ok = application:stop(asn1), - ok = application:stop(cowlib), - ok = application:stop(crypto), - ok = application:stop(ranch), - ok. - spdy(_) -> {ok, Pid} = gun:open("twitter.com", 443), Ref = gun:get(Pid, "/"), @@ -66,6 +35,7 @@ data_loop(Pid, Ref) -> ct:print("data ~p", [Data]), data_loop(Pid, Ref); {gun_data, Pid, Ref, fin, Data} -> + gun:close(Pid), ct:print("data ~p~nend", [Data]) after 5000 -> error(timeout) |