couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [03/48] couch commit: updated refs/heads/master to 7776921
Date Sat, 04 Apr 2015 23:28:58 GMT
Remove test_util:request

Use test_request:request instead

COUCHDB-2547


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/4529e128
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/4529e128
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/4529e128

Branch: refs/heads/master
Commit: 4529e1288a9d72637b0bcf19fe84cb39b646d37c
Parents: 9af979f
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Tue Jan 27 08:28:17 2015 -0800
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Tue Feb 10 10:33:45 2015 -0800

----------------------------------------------------------------------
 src/test_util.erl | 32 +-------------------------------
 1 file changed, 1 insertion(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/4529e128/src/test_util.erl
----------------------------------------------------------------------
diff --git a/src/test_util.erl b/src/test_util.erl
index 07bbeb0..acf8b3d 100644
--- a/src/test_util.erl
+++ b/src/test_util.erl
@@ -17,7 +17,7 @@
 -export([init_code_path/0]).
 -export([source_file/1, build_file/1]).
 %% -export([run/2]).
--export([request/3, request/4]).
+
 -export([start_couch/0, start_couch/1, start_couch/2, stop_couch/0, stop_couch/1]).
 -export([start_config/1, stop_config/1]).
 -export([start_applications/1]).
@@ -49,36 +49,6 @@ source_file(Name) ->
 build_file(Name) ->
     filename:join([builddir(), Name]).
 
-
-request(Url, Headers, Method) ->
-    request(Url, Headers, Method, []).
-
-request(Url, Headers, Method, Body) ->
-    request(Url, Headers, Method, Body, 3).
-
-request(_Url, _Headers, _Method, _Body, 0) ->
-    {error, request_failed};
-request(Url, Headers, Method, Body, N) ->
-    case code:is_loaded(ibrowse) of
-    false ->
-        {ok, _} = ibrowse:start();
-    _ ->
-        ok
-    end,
-    case ibrowse:send_req(Url, Headers, Method, Body) of
-    {ok, Code0, RespHeaders, RespBody0} ->
-        Code = list_to_integer(Code0),
-        RespBody = iolist_to_binary(RespBody0),
-        {ok, Code, RespHeaders, RespBody};
-    {error, {'EXIT', {normal, _}}} ->
-        % Connection closed right after a successful request that
-        % used the same connection.
-        request(Url, Headers, Method, Body, N - 1);
-    Error ->
-        Error
-    end.
-
-
 start_couch() ->
     start_couch(?CONFIG_CHAIN, []).
 


Mime
View raw message