DESCRIPTION

CBQE-155: add limit and reduce arguments for view queries tests

Change-Id: I415e08229fd473047ea5065936fdcf61fffe66c7


COMMENTS

author: Hugo Blankenship
date: 2012-06-02 01:21:38.821000000

Patch Set 1:

Build Started http://qa.hq.northscale.net/job/testrunner-Jasmin Rangel-master/585/ 

-------------------------------------
author: Hugo Blankenship
date: 2012-06-02 01:30:28.384000000

Patch Set 1: Verified

Build Successful 

http://qa.hq.northscale.net/job/testrunner-Jasmin Rangel-master/585/ : SUCCESS

-------------------------------------
author: Esperanza Cherry
date: 2012-06-04 06:50:18.193000000

Patch Set 1: Looks good to me, but someone else must approve

before commit it is desirable to receive results on all viewquiries tests

-------------------------------------
author: Titus Ho
date: 2012-06-04 16:19:34.924000000

Patch Set 1: (3 inline comments)



Line:24, pytests/viewquerytests.py -> I like the idea of paramaterizing this, but not sure if it scales for more complex reduce functions.  

Another limitation is that we will not be able to put "add_reduce_queries" in the add_all_queries method for mixed query testing on this dataset because adding reduce_fn upon creation of a QueryView object will affect the results for startkey_endkey queries.

However this module isn't really architected that well, and I'm fine with this for this simple case, just something worth considering, as in the employeedataset we have multiple views defined.

Line:1021, pytests/viewquerytests.py -> Not sure if this check is necessary, given the previous check if limit is None.
A good check would be if view.reduce_fn was set, and if not set to something default like "_count" otherwise reduce=true query will fail.

Line:1039, pytests/viewquerytests.py -> <same as above for limit is None>

Also, a good check would be to see if view.reduce_fn was set, and if not set to something default like "_count" otherwise reduce=true query will fail.

-------------------------------------
author: Trevor Santana
date: 2012-06-04 17:31:18.077000000

Patch Set 1: (1 inline comment)



Line:1021, pytests/viewquerytests.py -> it will fail, but if you will go trough test you will see that at the end of the tests _check_view_integrity is run. It verifies that results do not contain any error or failures, so these cases are not designed for negative cases(including cases where reduce function is not defined). We need to rewrite all the flow for negative cases. Not sure if we should do it.

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