DESCRIPTION

CBQE-2119: added tests for pause and resume for rebalance scenarios

Change-Id: If3704af4f7e72cc32d9febd705475e09fc534010


COMMENTS

author: Fisher Vargas
date: 2014-03-13 17:45:20.188000000

Uploaded patch set 2.

-------------------------------------
author: Hugo Blankenship
date: 2014-03-13 18:22:47.013000000

Patch Set 2: Verified+1

Build Successful 

http://factory.couchbase.com/job/testrunner-Jasmin Rangel-master/700/ : SUCCESS

-------------------------------------
author: Angelina Mayer
date: 2014-03-14 02:49:57.610000000

Patch Set 2:

(8 comments)

Line:17, conf/py-xdcr-pause-resume.conf -> Maybe add some more buckets?

Line:7, pytests/xdcr/pauseResumeTests.py -> Probably add a comment on what this class does?

Line:10, pytests/xdcr/pauseResumeTests.py -> Like the concept of class for this feature, good idea.

Can we have 2 classes? 
1. xdcrPauseResume(XDCRReplicationBaseTest) that serves as API class for pause-resume containing methods like-
setup()
teardown()
pause_all_replications()
resume_all_replications()
bidirectional_pause_all_replications()
bidirectional_resume_all_replications()
post_pause_validations() - move them here?
post_resume_validations()

2. PauseResumeTests( xdcrPauseResume) which will contain tests that use parent methods for uni/bi xdcr - containing methods
setUp() - just call base setUp()
teardown() 
replication_with_pause_and_resume()
- load
- call pause_all_replications() or bidirectional_pause_all_replications() based on rdirection param
- do test operation - reb-out/in/failover, 
- resume_all_validations()
- loop pause-resume in case of consecutive_pause_resume
- end load
- post resume ops if any
- merge and verify xdcr stats 

can we call this file xdcrPauseResume.py, there's pause-resume for rebalance too so if this file was moved out of xdcr folder for some reason, it might help.

Line:70, pytests/xdcr/pauseResumeTests.py -> Suggestion- if we called reb-out, swap rebalance and reb-in in here keepin this as parent function, do you think we can avoid duplicating code for starting load, ending load, pause-resume and xdcr verification?

Line:113, pytests/xdcr/pauseResumeTests.py -> Do we have to add test for pause after rebalance is initiated?

Line:117, pytests/xdcr/pauseResumeTests.py -> for self._num_rebalance >= len(self.src_nodes), can we log that's the case and we're skipping rebalance and failover?

Line:148, pytests/xdcr/pauseResumeTests.py -> Most of the code from here is duplicated in every method.

Line:182, pytests/xdcr/pauseResumeTests.py -> reb-in only one node at a time?

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