예제 #1
0
 def setUp(self):
     XDCRNewBaseTest.setUp(self)
     self.src_cluster = self.get_cb_cluster_by_name('C1')
     self.dest_cluster = self.get_cb_cluster_by_name('C2')
     self.src_master = self.src_cluster.get_master_node()
     self.dest_master = self.dest_cluster.get_master_node()
     self.src_rest = RestConnection(self.src_master)
     self.dest_rest = RestConnection(self.dest_master)
     initial_xdcr = random.choice([True, False])
     self.skip_validation = self._input.param("ok_if_random_filter_invalid",
                                              False)
     try:
         if initial_xdcr:
             self.load_data()
             self.setup_xdcr()
         else:
             self.setup_xdcr()
             self.load_data()
     except Exception as e:
         if self.skip_validation:
             if "create replication failed : status:False,content:{\"errors\":{\"filterExpression\":" in e.message:
                 self.log.warn(
                     "Random filter generated may not be valid, skipping doc count validation"
                 )
                 self.tearDown()
         else:
             self.fail(e.message)
 def setUp(self):
     XDCRNewBaseTest.setUp(self)
     self.src_cluster = self.get_cb_cluster_by_name('C1')
     self.dest_cluster = self.get_cb_cluster_by_name('C2')
     self.src_master = self.src_cluster.get_master_node()
     self.dest_master = self.dest_cluster.get_master_node()
     self.rdirection = self._input.param("rdirection", "unidirection")
     self.initial = self._input.param("initial", False)
     if self.initial:
         self.load_and_setup_xdcr()
     else:
         self.setup_xdcr_and_load()
예제 #3
0
 def setUp(self):
     XDCRNewBaseTest.setUp(self)
     self.src_cluster = self.get_cb_cluster_by_name('C1')
     self.dest_cluster = self.get_cb_cluster_by_name('C2')
     self.src_master = self.src_cluster.get_master_node()
     self.dest_master = self.dest_cluster.get_master_node()
     self.src_rest = RestConnection(self.src_master)
     self.dest_rest = RestConnection(self.dest_master)
     initial_xdcr = random.choice([True, False])
     if initial_xdcr:
         self.load_data()
         self.setup_xdcr()
     else:
         self.setup_xdcr()
         self.load_data()
예제 #4
0
 def create_buckets(self):
     XDCRNewBaseTest.setUp(self)
     self.servers = self._input.servers
     self.src_cluster = self.get_cb_cluster_by_name('C1')
     self.src_master = self.src_cluster.get_master_node()
     self.src_nodes = self.src_cluster.get_nodes()
     self.dest_cluster = self.get_cb_cluster_by_name('C2')
     self.dest_master = self.dest_cluster.get_master_node()
     self.dest_nodes = self.dest_cluster.get_nodes()
     self.gen_create = BlobGenerator('loadOne', 'loadOne', self._value_size, end=self.num_items)
     self.gen_delete = BlobGenerator('loadOne', 'loadOne-', self._value_size,
         start=int((self.num_items) * (float)(100 - self._perc_del) / 100), end=self.num_items)
     self.gen_update = BlobGenerator('loadOne', 'loadOne-', self._value_size, start=0,
         end=int(self.num_items * (float)(self._perc_upd) / 100))
     self._create_buckets(self.src_cluster)
     self._create_buckets(self.dest_cluster)
예제 #5
0
 def create_buckets(self):
     XDCRNewBaseTest.setUp(self)
     self.servers = self._input.servers
     self.src_cluster = self.get_cb_cluster_by_name('C1')
     self.src_master = self.src_cluster.get_master_node()
     self.src_nodes = self.src_cluster.get_nodes()
     self.dest_cluster = self.get_cb_cluster_by_name('C2')
     self.dest_master = self.dest_cluster.get_master_node()
     self.dest_nodes = self.dest_cluster.get_nodes()
     self.gen_create = BlobGenerator('loadOne', 'loadOne', self._value_size, end=self.num_items)
     self.gen_delete = BlobGenerator('loadOne', 'loadOne-', self._value_size,
         start=int((self.num_items) * (float)(100 - self._perc_del) / 100), end=self.num_items)
     self.gen_update = BlobGenerator('loadOne', 'loadOne-', self._value_size, start=0,
         end=int(self.num_items * (float)(self._perc_upd) / 100))
     self._create_buckets(self.src_cluster)
     self._create_buckets(self.dest_cluster)
예제 #6
0
    def _create_buckets(self, cluster):
        if cluster == self.src_cluster:
            buckets = self.buckets_on_src
        else:
            buckets = self.buckets_on_dest
        bucket_size = self._get_bucket_size(cluster.get_mem_quota(), len(buckets))

        if "default" in buckets:
            bucket_params = XDCRNewBaseTest._create_bucket_params(self, size=bucket_size,
                                                              replicas=self.num_replicas)
            cluster.create_default_bucket(bucket_params)

        sasl_buckets = len([bucket for bucket in buckets if bucket.startswith("sasl")])
        if sasl_buckets > 0:
            cluster.create_sasl_buckets(bucket_size, num_buckets=sasl_buckets)

        standard_buckets = len([bucket for bucket in buckets if bucket.startswith("standard")])
        if standard_buckets > 0:
            cluster.create_standard_buckets(bucket_size, num_buckets=standard_buckets)
예제 #7
0
 def tearDown(self):
     try:
         XDCRNewBaseTest.tearDown(self)
     finally:
         self.cluster.shutdown(force=True)
예제 #8
0
 def setUp(self):
     XDCRNewBaseTest.setUp(self)
     self.assert_(self.get_num_cb_cluster() >= 3,
                  "Atleast 3 Clusters needed to run Topology Tests")
예제 #9
0
 def tearDown(self):
     return XDCRNewBaseTest.tearDown(self)
예제 #10
0
 def tearDown(self):
     try:
         XDCRNewBaseTest.tearDown(self)
     finally:
         self.cluster.shutdown(force=True)
예제 #11
0
 def tearDown(self):
     try:
         if not self.skip_this_version:
             XDCRNewBaseTest.tearDown(self)
     finally:
         self.cluster.shutdown(force=True)
예제 #12
0
 def tearDown(self):
     XDCRNewBaseTest.tearDown(self)
예제 #13
0
 def tearDown(self):
     XDCRNewBaseTest.tearDown(self)
예제 #14
0
 def setUp(self):
     XDCRNewBaseTest.setUp(self)
예제 #15
0
 def setUp(self):
     XDCRNewBaseTest.setUp(self)