Browse files

Merge pull request #238 from basho/cet-replication2-http-pb-cleanup

Use rt functions for HTTP and restore logging for pb connection establishment
  • Loading branch information...
2 parents 8989890 + 9e0c249 commit 08fdb5643e30e335d50ae1a4860b7762a57e1640 Dave Parfitt committed Mar 21, 2013
Showing with 7 additions and 5 deletions.
  1. +7 −5 tests/replication2.erl
View
12 tests/replication2.erl
@@ -438,6 +438,9 @@ replication([AFirst|_] = ANodes, [BFirst|_] = BNodes, Connected) ->
fin.
pb_write_during_shutdown(Target, BSecond, TestBucket) ->
+ ConnInfo = proplists:get_value(Target, rt:connection_info([Target])),
+ {IP, Port} = proplists:get_value(pb, ConnInfo),
+ lager:info("Connecting to pb socket ~p:~p on ~p", [IP, Port, Target]),
PBSock = rt:pbc(Target),
%% do the stop in the background while we're writing keys
@@ -491,11 +494,10 @@ pb_write_during_shutdown(Target, BSecond, TestBucket) ->
end.
http_write_during_shutdown(Target, BSecond, TestBucket) ->
- {ok, [{_IP, Port}|_]} = rpc:call(Target, application, get_env, [riak_core, http]),
-
- lager:info("Connecting to http socket ~p:~p on ~p", ["127.0.0.1", Port,
- Target]),
- C = rhc:create("127.0.0.1", Port, "riak", []),
+ ConnInfo = proplists:get_value(Target, rt:connection_info([Target])),
+ {IP, Port} = proplists:get_value(http, ConnInfo),
+ lager:info("Connecting to http socket ~p:~p on ~p", [IP, Port, Target]),
+ C = rt:httpc(Target),
%% do the stop in the background while we're writing keys
spawn(fun() ->

0 comments on commit 08fdb56

Please sign in to comment.