Browse files

Fix insufficient vnodes in verify_listkeys

Fixes issue #149, related to basho/riak_core#228
If queried right after it has joined the cluster, a node may not have
the other nodes registered by the node watcher yet. Switching to waiting
until all nodes in the cluster have been registered by the node watcher
before performing query.
Also, querying for all nodes after stopping/starting just in case,
although I haven't seen problems there, but sound reasonable.
Removing assert from the call to wait_until_no_pending_changes since it
is already asserting internally.
  • Loading branch information...
1 parent 4c871fd commit eb6c3eba154fa85b9025e3cc2de4157c42a2ff21 @engelsanchez engelsanchez committed Jan 30, 2013
Showing with 5 additions and 3 deletions.
  1. +5 −3 tests/verify_listkeys.erl
@@ -45,7 +45,8 @@ confirm() ->
Ns = lists:usort([Node|Cluster]),
lager:info("Wait until there are no pending changes"),
- ?assertEqual(ok, rt:wait_until_no_pending_changes(Ns)),
+ rt:wait_until_no_pending_changes(Ns),
+ rt:wait_for_cluster_service(Ns, riak_kv),
lager:info("Check keys and buckets after transfer"),
@@ -64,11 +65,12 @@ confirm() ->
lager:info("Starting Node ~p", [Prev]),
+ UpNodes = Nodes -- [Node],
lager:info("Waiting for riak_kv service to be ready in ~p", [Prev]),
- rt:wait_for_service(Prev, riak_kv),
+ rt:wait_for_cluster_service(UpNodes, riak_kv),
lager:info("Check keys and buckets"),
- check_it_all(Nodes -- [Node]),
+ check_it_all(UpNodes),
end, Node1, [Node2, Node3, Node4]),

0 comments on commit eb6c3eb

Please sign in to comment.