DESCRIPTION

CBQE:-2108 Automation for P1 pause-resume tests

Change-Id: Ie6a476c9706add5eabcf3555f289e1befa051d07


COMMENTS

author: Angelina Mayer
date: 2014-03-29 03:40:18.541000000

Uploaded patch set 1.

-------------------------------------
author: Hugo Blankenship
date: 2014-03-29 03:40:22.925000000

Patch Set 1:

Build Started http://factory.couchbase.com/job/testrunner-Jasmin Rangel-master/841/

-------------------------------------
author: Angelina Mayer
date: 2014-03-29 03:42:53.748000000

Patch Set 1: Verified+1

-------------------------------------
author: Hugo Blankenship
date: 2014-03-29 04:03:49.866000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Fisher Vargas
date: 2014-03-29 12:06:31.616000000

Patch Set 1: Code-Review-1

(1 comment)

Line:19, pytests/xdcr/upgradeXDCR.py -> This change is not advisable. It violates coding principle. You can make pause and resume function as static. and call as PauseResumeXDCRBaseTest.pause_xdcr(self).

-------------------------------------
author: Esperanza Cherry
date: 2014-03-31 21:31:14.609000000

Patch Set 1:

[4/1/14, 12:00:25 AM] Angelina Mayerperumal: since pause resume base class derives xdcrbase tests class, I replaced xdcrbase tests class in upgrade class for easy fix
[4/1/14, 12:01:02 AM] Angelina Mayerperumal: do you think we can do this?
[4/1/14, 12:02:16 AM] Angelina Mayerperumal: if not, there are 2 options - also make UpgradeTests derive PauseResumeBaseTest class in addition to (NewUpgradeBaseTest, XDCRReplicationBaseTest)
[4/1/14, 12:03:43 AM] Angelina Mayerperumal: here my concern is we will duplicate members of XDCRReplicationBaseTest…but Python says it creates just one copy of members if there are many due to inheritance of common class
[4/1/14, 12:05:43 AM] Angelina Mayerperumal: second option is to make PauseResumeBaseTest class methods static….but that will involve changing all variables too, followed by testing of classes that use PauseResumeBaseTest
[4/1/14, 12:05:50 AM] Angelina Mayerperumal: which do you suggest
[4/1/14, 12:06:32 AM] Esperanza Cherry: 5 min
[4/1/14, 12:06:35 AM] Angelina Mayerperumal: ok
[4/1/14, 12:16:31 AM] Esperanza Cherry: let's think
All options work

since pause resume base class derives xdcrbase tests class, I replaced xdcrbase tests class in upgrade class for easy fix - I'm okay with  these changes
we don't broke any python principles. 
the only problem that we need to always consider which method will be called (if we have the same name)
[4/1/14, 12:17:09 AM] Esperanza Cherry: the second option - seems like we need to modify almost all in PauseResumeXDCRBaseTest
[4/1/14, 12:17:11 AM] Angelina Mayerperumal: we don't have overlapping methods
[4/1/14, 12:17:39 AM] Angelina Mayerperumal: PauseResumeBaseTest only adds pause-resume specific tests on top of xdcrBasetests
[4/1/14, 12:18:38 AM] Angelina Mayerperumal: yeah, modifying PauseResumeXDCRBaseTest to static is a lot of work
[4/1/14, 12:19:19 AM] Angelina Mayerperumal: I'm almost half done with changes…but started wondering if this is the right thing to do because of the testing I need to do otherwise
[4/1/14, 12:20:44 AM] Angelina Mayerperumal: so you recommend no changes?
[4/1/14, 12:21:41 AM] Esperanza Cherry: for now - yes
[4/1/14, 12:22:07 AM] Esperanza Cherry: I would like to create class like PauseResumeHelper
[4/1/14, 12:23:11 AM] Angelina Mayerperumal: which would have static methods?
[4/1/14, 12:23:22 AM] Esperanza Cherry: and put methods like resume_replication(server, bucket), resume_all_replication(server)
[4/1/14, 12:24:13 AM] Esperanza Cherry: not fully static
it will have methods that can get info from cluster dynamically and handle it
[4/1/14, 12:25:22 AM] Esperanza Cherry: but sure it's better to have static methods
[4/1/14, 12:25:27 AM] Angelina Mayerperumal: well, initially we had planned for the PauseResumeXDCRBaseTest to be that sort of helper class
[4/1/14, 12:25:42 AM] Angelina Mayerperumal: later went the inheritance way
[4/1/14, 12:25:43 AM] Esperanza Cherry: they are simple to be used
[4/1/14, 12:27:13 AM] Angelina Mayerperumal: yeah, so should I change PauseResumeXDCRBaseTest to have static methods or leave this implementation for now?
[4/1/14, 12:27:35 AM] Esperanza Cherry: the simplest way for now:
in your changes you use only self.pause_xdcr() self.resume_xdcr()
[4/1/14, 12:27:51 AM] Esperanza Cherry: so you can add this methods in new helper
[4/1/14, 12:28:20 AM] Angelina Mayerperumal: Helper will anyway have all the methods from PauseResumeXDCRBaseTest
[4/1/14, 12:28:46 AM] Esperanza Cherry: if you have time replace them in PauseResumeXDCRBaseTest if don't you could not touch PauseResumeXDCRBaseTest at all
[4/1/14, 12:29:18 AM] Angelina Mayerperumal: ok, makes sense

-------------------------------------
author: Esperanza Cherry
date: 2014-03-31 21:33:55.726000000

Patch Set 1:

resume:
[4/1/14, 12:27:35 AM] Esperanza Cherry: the simplest way for now:
in your changes you use only self.pause_xdcr() self.resume_xdcr()
[4/1/14, 12:27:51 AM] Esperanza Cherry: so you can add this methods in new helper
[4/1/14, 12:28:20 AM] Angelina Mayerperumal: Helper will anyway have all the methods from PauseResumeXDCRBaseTest
[4/1/14, 12:28:46 AM] Esperanza Cherry: if you have time replace them in PauseResumeXDCRBaseTest if don't you could not touch PauseResumeXDCRBaseTest at all

new test implementation should not significantly change the old code. code refactoring should be done separately

-------------------------------------
author: Angelina Mayer
date: 2014-04-01 17:39:07.173000000

Patch Set 1:

Based on the above comment, can one of you approve the code so I can get the new tests running?

-------------------------------------
author: Fisher Vargas
date: 2014-04-02 04:30:57.065000000

Patch Set 1: Code-Review+2

Approved, please plan refactoring separately on any CBQE.

-------------------------------------
author: Fisher Vargas
date: 2014-04-02 04:32:26.255000000

Patch Set 1:

Please change the commit summary to "CBQE-2108: Extending XDCR upgrade tests for  pause-resume feature"

-------------------------------------
author: Esperanza Cherry
date: 2014-04-02 12:14:49.160000000

Patch Set 1:

(1 comment)

Line:43, conf/py-xdcr-pause-resume.conf -> why we need to test upgrade 3.0.0-492-rel-> latest version

-------------------------------------
author: Tate Garrett
date: 2014-04-02 15:39:16.526000000

The change could not be merged due to a path conflict.

Please rebase the change locally and upload the rebased commit for review.

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