DESCRIPTION

CBQE3036: Add test cases to uneven add and deletion of nodes concurrently to avoid swap rebalance

Changes made:
In basetestcase.py: Added a method verify_replica_distribution_in_zones verify replicas in the server groups. Also reformatted the file to remove redundant spaces and make file more readable.
In rebalance_base.py: Added methods shuffle_nodes_between_zones_and_rebalance and add_remove_servers_and_rebalance to add and remove servers and rebalance and shuffle nodes between server groups.
In rebalanceinout.py: Made changes to testcases to use the new methods in rebalance_base to shuffle nodes when zone>1 is mentioned while invoking the test cases. Also changes to have uneven adds and deletes again from params passed into the testcase.
Change-Id: I0ffba808d6f04b99f9d82fe6b03886853235e68a

COMMENTS

author: Lucille Zavala
date: 2015-10-06 12:36:32.475000000

Patch Set 2: Commit message was updated

-------------------------------------
author: Hugo Blankenship
date: 2015-10-06 12:36:38.051000000

Patch Set 2:

Build Started http://factory.couchbase.com/job/testrunner-Jasmin Rangel-sherlock/5992/

-------------------------------------
author: Hugo Blankenship
date: 2015-10-06 13:08:18.282000000

Patch Set 2: Verified+1

Build Successful 

http://factory.couchbase.com/job/testrunner-Jasmin Rangel-sherlock/5992/ : SUCCESS

-------------------------------------
author: Adelaide Rodgers
date: 2015-10-07 23:44:33.805000000

Patch Set 2: Code-Review-1

(13 comments)

Most of the comments are nitpicks except Line 1361 - hope you have tested the code on local as well as jenkins - since we are touching a lot of code in common area it will be good to have a regression suite run against on jenkins against your code before checking in

Line:44, pytests/rebalance/rebalance_base.py -> it would be better to keep params and description of function together in one comment block

Line:81, pytests/rebalance/rebalance_base.py -> Correct message to : Verify replica of one node should not be in same zone of active

Line:90, pytests/rebalance/rebalance_base.py -> it would be better to keep params and description of function together in one comment block

Line:189, pytests/basetestcase.py -> it will look good if this and following statements are aligned with previous line

Line:614, pytests/basetestcase.py -> please move this to line above

Line:827, pytests/basetestcase.py -> please move this to previous line

Line:831, pytests/basetestcase.py -> please move this to previous line

Line:1356, pytests/basetestcase.py -> would be better if message says "OS not supported"

Line:1361, pytests/basetestcase.py -> shouldn't this be versions[0][:5] and NOT versions[00][:5]??

Line:1364, pytests/basetestcase.py -> leave space after pipe for grep to keep it in sync with other commands

Line:1935, pytests/basetestcase.py -> please move this line above

Line:1940, pytests/basetestcase.py -> please move this line above

Line:1945, pytests/basetestcase.py -> please move this line above

-------------------------------------
author: Coby Mathis
date: 2015-10-12 10:24:50.013000000

Patch Set 2:

(7 comments)

Line:32, pytests/rebalance/rebalanceinout.py -> name of the test method should start with "test_" keyword,

Line:42, pytests/rebalance/rebalance_base.py -> test name should start with "test_"

Line:44, pytests/rebalance/rebalance_base.py -> Done

Line:46, pytests/rebalance/rebalance_base.py -> Instread of this if, can we  initialize to_remove to [] (empty list) in the mothod call itself?

Line:1349, pytests/basetestcase.py -> Calculate info.type.lower() only once to avoid multiple calls to lower() function. It is used 7 times in a method!

Line:1367, pytests/basetestcase.py -> No need of elif. Only else will serve the purpose.

Line:1368, pytests/basetestcase.py -> Triple quotes are always used to represent docstrings. For multiline comments (block comments) use # before the comment on each line.

-------------------------------------
author: Tate Garrett
date: 2015-10-27 06:06:14.474000000

Change has been successfully cherry-picked as fd9784fe08eebd9b5251ab22eae7ba72ce3487bb

-------------------------------------
