Skip to content
Browse files

CBQE-2304 fix case that adds 1 more node to rebalance

so total node more than nodes_init and we could collect more nodes than initial nodes

Change-Id: I30586dc4dd4c8a2aa8684e998dfcc9e6729a00d8
Reviewed-on: http://review.couchbase.org/39332
Reviewed-by: Thuan Nguyen <soccon@gmail.com>
Tested-by: Thuan Nguyen <soccon@gmail.com>
  • Loading branch information...
1 parent 4d39515 commit aa1aa4ed9241d86a2acc2fb394a7a9607991127b @saigon saigon committed with saigon Jul 11, 2014
Showing with 4 additions and 5 deletions.
  1. +4 −5 pytests/cwc/cwctests.py
View
9 pytests/cwc/cwctests.py
@@ -1,12 +1,11 @@
-import json
import time
import unittest
import random
import testconstants
from TestInput import TestInputSingleton
from cwc.cwc_base import CWCBaseTest
-from membase.api.rest_client import RestConnection, Bucket
+from membase.api.rest_client import RestConnection
from remote.remote_util import RemoteMachineShellConnection
@@ -28,8 +27,7 @@ def tearDown(self):
def test_start_collect_log_without_upload(self):
rest = RestConnection(self.master)
shell = RemoteMachineShellConnection(self.master)
- if "*" not in str(self.collect_nodes) and self.nodes_init > 1 and \
- self.collect_nodes <= self.nodes_init:
+ if "*" not in str(self.collect_nodes) and self.nodes_init > 1:
self.collect_nodes = self._generate_random_collecting_node(rest)
status, content = rest.start_cluster_logs_collection(nodes=self.collect_nodes)
if status:
@@ -65,7 +63,8 @@ def _verify_log_file(self, rest):
node_failed_to_collect = []
for node in perNode:
for server in self.servers[:self.nodes_init]:
- if server.ip in node:
+ if server.ip in node or (self.nodes_init == 1 \
+ and "127.0.0.1" in node):
shell = RemoteMachineShellConnection(server)
file_name = perNode[node]["path"].replace(self.log_path, "")
collected = False

0 comments on commit aa1aa4e

Please sign in to comment.
Something went wrong with that request. Please try again.