-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CBQE-2328: Add test to repro MB-11698
Change-Id: I556f2c789cc1ce6e7c678dcb1a27fc579ce8936f Reviewed-on: http://review.couchbase.org/39441 Tested-by: buildbot <build@couchbase.com> Reviewed-by: Ketaki Gangal <ketakigangal@gmail.com>
- Loading branch information
1 parent
42c3b0c
commit 7535c6b
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,29 @@ | |||
import time | |||
from couchbase.documentgenerator import BlobGenerator | |||
from eviction.evictionbase import EvictionBase | |||
from membase.helper.cluster_helper import ClusterOperationHelper | |||
from remote.remote_util import RemoteMachineShellConnection | |||
|
|||
class EvictionChangePolicy(EvictionBase): | |||
|
|||
def test_reproducer_MB_11698(self): | |||
gen_create = BlobGenerator('eviction', 'eviction-', self.value_size, end=self.num_items) | |||
gen_create2 = BlobGenerator('eviction2', 'eviction2-', self.value_size, end=self.num_items) | |||
self._load_all_buckets(self.master, gen_create, "create", 0) | |||
self._wait_for_stats_all_buckets(self.servers[:self.nodes_init]) | |||
self._verify_stats_all_buckets(self.servers[:self.nodes_init]) | |||
remote = RemoteMachineShellConnection(self.master) | |||
for bucket in self.buckets: | |||
output, _ = remote.execute_couchbase_cli(cli_command='bucket-edit', | |||
cluster_host="localhost", | |||
user=self.master.rest_username, | |||
password=self.master.rest_password, | |||
options='--bucket=%s --bucket-eviction-policy=valueOnly' % bucket.name) | |||
self.assertTrue(' '.join(output).find('SUCCESS') != -1, 'Eviction policy wasn\'t changed') | |||
ClusterOperationHelper.wait_for_ns_servers_or_assert( | |||
self.servers[:self.nodes_init], self, | |||
wait_time=self.wait_timeout, wait_if_warmup=True) | |||
self.sleep(10, 'Wait some time before next load') | |||
self._load_all_buckets(self.master, gen_create2, "create", 0) | |||
self._wait_for_stats_all_buckets(self.servers[:self.nodes_init], timeout=self.wait_timeout * 5) | |||
self._verify_stats_all_buckets(self.servers[:self.nodes_init]) |