diff --git a/tests/replication2_pg.erl b/tests/replication2_pg.erl index b8e1bcc2..6c1d8798 100644 --- a/tests/replication2_pg.erl +++ b/tests/replication2_pg.erl @@ -244,19 +244,19 @@ test_basic_pg(Mode, SSL) -> PGResult3 = riak_repl_pb_api:get(PidC,Bucket,KeyA,CidA,Options), % it's ok if the first request fails due to the options, % try it again without options to see if it passes - case PGResult3 of + RetriableGet = case PGResult3 of {ok, PGResult3Value} -> - ?assertEqual(ValueA, riakc_obj:get_value(PGResult3Value)); + riakc_obj:get_value(PGResult3Value); {error, notfound} -> RetryOptions = [{n_val, 1}], {ok, PGResult4Value} = riak_repl_pb_api:get(PidC,Bucket,KeyA,CidA,RetryOptions), - ?assertEqual(ValueA, riakc_obj:get_value(PGResult4Value)); + riakc_obj:get_value(PGResult4Value); UnknownResult -> - %% welp, we might have been expecting a notfound, but we got - %% something else. - lager:error("Unexpected result: %p", [UnknownResult]), - ?assertEqual(fish, chips) + %% welp, we might have been expecting a notfound, but we got + %% something else. + UnknownResult end, + ?assertEqual(ValueA, RetriableGet), pass. %% test 1.2 replication (aka "Default" repl)