Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CBQE-1: drainrate tests should work against cluster_run

Change-Id: I932e372b7b11cd797105853de1afea3e7538458c
Reviewed-on: http://review.couchbase.org/17872
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Karan Kumar <karan@couchbase.com>
Reviewed-by: Farshid Ghods <farshid@couchbase.com>
Tested-by: Farshid Ghods <farshid@couchbase.com>
  • Loading branch information...
commit 112a03677a141526f66f2f6ac1c568ad2fbb7477 1 parent b898cc9
@farshidce farshidce authored Farshid Ghods committed
Showing with 15 additions and 14 deletions.
  1. +15 −14 pytests/drainratetests.py
View
29 pytests/drainratetests.py
@@ -41,22 +41,23 @@ def _log_finish(self):
except:
pass
- def _create_default_bucket(self):
- rest = RestConnection(self.master)
- helper = RestHelper(RestConnection(self.master))
- if not helper.bucket_exists(self.bucket):
- node_ram_ratio = BucketOperationHelper.base_bucket_ratio([self.master])
+ def _create_default_bucket(self, replica=1):
+ name = "default"
+ master = self.input.servers[0]
+ rest = RestConnection(master)
+ helper = RestHelper(RestConnection(master))
+ if not helper.bucket_exists(name):
+ node_ram_ratio = BucketOperationHelper.base_bucket_ratio(self.input.servers)
info = rest.get_nodes_self()
available_ram = info.memoryQuota * node_ram_ratio
- serverInfo = self.master
- rest.init_cluster(username=serverInfo.rest_username,
- password=serverInfo.rest_password)
- rest.init_cluster_memoryQuota(memoryQuota=int(info.mcdMemoryReserved * node_ram_ratio))
- rest.create_bucket(bucket=self.bucket, ramQuotaMB=int(available_ram))
- ready = BucketOperationHelper.wait_for_memcached(self.master, self.bucket)
+ if( available_ram < 256):
+ available_ram = 256
+ rest.create_bucket(bucket=name, ramQuotaMB=int(available_ram), replicaNumber=replica)
+ ready = BucketOperationHelper.wait_for_memcached(master, name)
self.assertTrue(ready, msg="wait_for_memcached failed")
- self.assertTrue(helper.bucket_exists(self.bucket),
- msg="unable to create {0} bucket".format(self.bucket))
+ self.assertTrue(helper.bucket_exists(name),
+ msg="unable to create {0} bucket".format(name))
+
def _load_data_for_buckets(self):
rest = RestConnection(self.master)
@@ -73,7 +74,7 @@ def _load_data_for_buckets(self):
number_of_threads=1,
number_of_items=self.number_of_items,
write_only=True,
- moxi=False)
+ moxi=True)
def _parallel_read(self):
rest = RestConnection(self.master)
Please sign in to comment.
Something went wrong with that request. Please try again.