From 910a25b6502150014ccbd71080d1363461406618 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Mon, 28 Feb 2011 17:51:24 +0100 Subject: Fix file descriptor leak in crashdump_viewer:chunk_page Also, remove compiler warnings for crashdump_viewer_SUITE and fix Makefile in test directory so Emakefile does not grow. --- lib/observer/test/Makefile | 2 +- lib/observer/test/crashdump_viewer_SUITE.erl | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'lib/observer/test') diff --git a/lib/observer/test/Makefile b/lib/observer/test/Makefile index e15bde7346..6073e6ea00 100644 --- a/lib/observer/test/Makefile +++ b/lib/observer/test/Makefile @@ -53,7 +53,7 @@ EBIN = . make_emakefile: $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) \ - $(MODULES) >> $(EMAKEFILE) + $(MODULES) > $(EMAKEFILE) tests debug opt: make_emakefile cd $(ERL_TOP)/lib/test_server/src && \ diff --git a/lib/observer/test/crashdump_viewer_SUITE.erl b/lib/observer/test/crashdump_viewer_SUITE.erl index c547b997d1..8449e8a7c4 100644 --- a/lib/observer/test/crashdump_viewer_SUITE.erl +++ b/lib/observer/test/crashdump_viewer_SUITE.erl @@ -68,7 +68,7 @@ init_per_suite(doc) -> init_per_suite(Config) when is_list(Config) -> Dog = ?t:timetrap(?default_timeout), application:start(inets), % will be using the http client later - http:set_options([{ipv6,disabled}]), + httpc:set_options([{ipfamily,inet6fb4}]), DataDir = ?config(data_dir,Config), Rels = [R || R <- [r12b,r13b], ?t:is_release_available(R)] ++ [current], io:format("Creating crash dumps for the following releases: ~p", [Rels]), @@ -112,7 +112,7 @@ start(Config) when is_list(Config) -> undefined = whereis(crashdump_viewer_server), undefined = whereis(web_tool), Url = cdv_url(Port,"start_page"), - {error,_} = http:request(get,{Url,[]},[],[]), + {error,_} = httpc:request(Url), % exit(whereis(httpc_manager),kill), ?t:timetrap_cancel(AngryDog), ok. @@ -246,7 +246,7 @@ cdv_url(Port,Link) -> "http://localhost:" ++ Port ++ "/cdv_erl/crashdump_viewer/" ++ Link. request_sync(Method,HTTPReqCont) -> - case http:request(Method, + case httpc:request(Method, HTTPReqCont, [{timeout,30000}], [{full_result, false}]) of @@ -254,13 +254,13 @@ request_sync(Method,HTTPReqCont) -> Html; {ok,{Code,Html}} -> io:format("~s\n", [Html]), - io:format("Received ~w from http:request(...) with\nMethod=~w\n" + io:format("Received ~w from httpc:request(...) with\nMethod=~w\n" "HTTPReqCont=~p\n", [Code,Method,HTTPReqCont]), ?t:fail(); Other -> io:format( - "Received ~w from http:request(...) with\nMethod=~w\n" + "Received ~w from httpc:request(...) with\nMethod=~w\n" "HTTPReqCont=~p\n", [Other,Method,HTTPReqCont]), ?t:fail() @@ -497,15 +497,15 @@ expand_binary_link(Html) -> end. -next_link(Html) -> - case Html of - " - "next?pos=" ++ string:sub_word(Rest,1,$"); - [_H|T] -> - next_link(T); - [] -> - [] - end. +%% next_link(Html) -> +%% case Html of +%% " +%% "next?pos=" ++ string:sub_word(Rest,1,$"); +%% [_H|T] -> +%% next_link(T); +%% [] -> +%% [] +%% end. -- cgit v1.2.3