Permalink
Browse files

MB-100: small changes in start_stop_rebalance_in_out

Change-Id: I967178c5c300cace89430fec23517aea1b2caeca
Reviewed-on: http://review.couchbase.org/22609
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Andrei Baranouski <andrei.baranouski@gmail.com>
  • Loading branch information...
1 parent 83ffc77 commit 86fb4ad2b20e548ea6fc3bd1f5b61fe85efd3cb3 @andreibaranouski andreibaranouski committed with andreibaranouski Nov 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 pytests/rebalance/rebalanceinout.py
@@ -110,7 +110,7 @@ def start_stop_rebalance_in_out(self):
if i == 1:
rebalance = self.cluster.async_rebalance(servs_init[:self.nodes_init], servs_in, servs_out)
else:
- self.cluster.async_rebalance(servs_init[:self.nodes_init] + servs_in, add_in_once, servs_out + extra_servs_out)
+ rebalance = self.cluster.async_rebalance(servs_init[:self.nodes_init] + servs_in, add_in_once, servs_out + extra_servs_out)
add_in_once = []
result_nodes = set(servs_init + servs_in + extra_servs_in) - set(servs_out + extra_servs_out)
time.sleep(5)
@@ -119,7 +119,7 @@ def start_stop_rebalance_in_out(self):
self.assertTrue(reached, "rebalance failed or did not reach {0}%".format(expected_progress))
stopped = rest.stop_rebalance()
self.assertTrue(stopped, msg="unable to stop rebalance")
- time.sleep(1)
+ rebalance.result()
if RestHelper(rest).is_cluster_rebalanced():
self.verify_cluster_stats(result_nodes)
self.log.info("rebalance was completed when tried to stop rebalance on {0}%".format(str(expected_progress)))

0 comments on commit 86fb4ad

Please sign in to comment.