Skip to content

Commit

Permalink
Remove dead code from riak_kv_get_fsm
Browse files Browse the repository at this point in the history
Pair-programemd with @reiddraper
  • Loading branch information
Vagabond committed Apr 11, 2014
1 parent 2eade19 commit b480133
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/riak_kv_get_fsm.erl
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ init([From, Bucket, Key, Options0, Monitor]) ->
timing = riak_kv_fsm_timing:add_timing(prepare, []),
startnow = StartNow},
(Monitor =:= true) andalso riak_kv_get_put_monitor:get_fsm_spawned(self()),
Trace = application:get_env(riak_kv, fsm_trace_enabled),
Trace = app_helper:get_env(riak_kv, fsm_trace_enabled),
case Trace of
true ->
riak_core_dtrace:put_tag([Bucket, $,, Key]),
Expand Down Expand Up @@ -315,7 +315,7 @@ preflist_for_tracing(Preflist) ->
%% TODO: We can see entire preflist (more than 4 nodes) if we concatenate
%% all info into a single string.
[if is_atom(Nd) ->
[atom2list(Nd), $,, integer_to_list(Idx)];
[atom_to_list(Nd), $,, integer_to_list(Idx)];
true ->
<<>> % eunit test
end || {Idx, Nd} <- lists:sublist(Preflist, 4)].
Expand Down Expand Up @@ -616,11 +616,6 @@ details() ->
[timing,
vnodes].

atom2list(A) when is_atom(A) ->
atom_to_list(A);
atom2list(P) when is_pid(P)->
pid_to_list(P). % eunit tests

-ifdef(TEST).
-define(expect_msg(Exp,Timeout),
?assertEqual(Exp, receive Exp -> Exp after Timeout -> timeout end)).
Expand Down

3 comments on commit b480133

@cmeiklejohn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, the eunit tests don't call this with a pid anymore?

@reiddraper
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not seeing any failures related to this, but they could be hiding since the tests aren't green anyway. Is there a particular test you had in mind?

@cmeiklejohn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, no. Was mainly just referring to the comments.

Please sign in to comment.