Skip to content

Commit

Permalink
Rebalance volume test : Adding timeout
Browse files Browse the repository at this point in the history
Change-Id: I8aecd2c2031fad1b85cd7129ff2a17d46c430c64
Reviewed-on: http://review.couchbase.org/93341
Reviewed-by: Balakumaran G <balakumaran.gopal@couchbase.com>
Tested-by: vikas chaudhary <vikas.chaudhary@couchbase.com>
  • Loading branch information
vikas-getconnect committed Apr 26, 2018
1 parent e81b195 commit 3165880
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions pytests/rebalance/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def check_dataloss(self, server, bucket, num_items):
from couchbase.exceptions import NotFoundError,CouchbaseError
from lib.memcached.helper.data_helper import VBucketAwareMemcached
self.log.info("########## validating data for bucket : {} ###########".format(bucket))
bkt = Bucket('couchbase://{0}/{1}'.format(server.ip, bucket.name))
bkt = Bucket('couchbase://{0}/{1}'.format(server.ip, bucket.name),timeout=5000)
rest = RestConnection(self.master)
VBucketAware = VBucketAwareMemcached(rest, bucket.name)
_, _, _ = VBucketAware.request_map(rest, bucket.name)
Expand All @@ -63,7 +63,7 @@ def check_dataloss(self, server, bucket, num_items):
try:
bkt.get(key)
except NotFoundError:
vBucketId = VBucketAware._get_vBucket_id(key,timeout=500)
vBucketId = VBucketAware._get_vBucket_id(key)
errors.append("Missing key: {0}, VBucketId: {1}".
format(key, vBucketId))
batch_start += batch_size
Expand Down Expand Up @@ -276,6 +276,22 @@ def test_volume_with_rebalance(self):
self.check_dataloss(self.master, b,self.num_items*11)
self.sleep(30)

def test_voulme_update(self):
self.src_bucket = RestConnection(self.master).get_buckets()
rest = RestConnection(self.master)
bucket = rest.get_buckets()
self.create_ddocs_and_views()
load_thread = []
for bk in bucket:
load_thread.append(Thread(target=self.load_buckets_with_high_ops, args=(self.master,bk,self.num_items)))
for t in load_thread:
t.start()
servers_init = self.servers[:self.nodes_init]
new_server_list = self.servers[0:self.nodes_init]
for t in load_thread:
t.join()
self.sleep(30)

def shuffle_nodes_between_zones_and_rebalance(self, to_remove=None):
"""
Shuffle the nodes present in the cluster if zone > 1. Rebalance the nodes in the end.
Expand Down

0 comments on commit 3165880

Please sign in to comment.