add ?assertEquals around wait_for_pg() calls

This commit is contained in:
Dave Parfitt 2013-05-16 15:11:39 -04:00
parent a2ae66498f
commit e37893eea4

View File

@ -307,17 +307,15 @@ test_pg_proxy() ->
[RunningBNode | _ ] = BNodes -- [PGLeaderB],
repl_util:wait_until_leader(RunningBNode),
lager:info("Now trying proxy_get"),
WaitUntilPGResult = wait_until_pg(RunningBNode, PidB, Bucket, KeyC, CidA),
lager:info("Wait until PG Result:", [WaitUntilPGResult]),
?assertEqual(ok, wait_until_pg(RunningBNode, PidB, Bucket, KeyC, CidA)),
lager:info("If you got here, proxy_get worked after the pg block requesting leader was killed"),
lager:info("Stopping leader on provider cluster"),
PGLeaderA = rpc:call(FirstA, riak_core_cluster_mgr, get_leader, []),
rt:stop(PGLeaderA),
rt:log_to_nodes(AllNodes, "Killing leader on provider cluster"),
[RunningANode | _ ] = ANodes -- [PGLeaderA],
repl_util:wait_until_leader(RunningANode),
wait_until_pg(RunningBNode, PidB, Bucket, KeyD, CidA),
?assertEqual(ok, wait_until_pg(RunningBNode, PidB, Bucket, KeyD, CidA)),
lager:info("If you got here, proxy_get worked after the pg block providing leader was killed"),
lager:info("pg_proxy test complete. Time to obtain celebratory cheese sticks."),