DESCRIPTION

CBQE: 3067 added elastic search APIs

Change-Id: I5a7a1e7183afda0436eb0b802160056ef14a807c


COMMENTS

author: Hugo Blankenship
date: 2015-10-14 21:10:33.914000000

Patch Set 2:

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

-------------------------------------
author: Hugo Blankenship
date: 2015-10-14 21:54:43.519000000

Patch Set 2: Verified-1

Build Failed 

http://factory.couchbase.com/job/testrunner-Jasmin Rangel-sherlock/6035/ : FAILURE

detect lines like:

suite viewmergetests.ViewMergingTests , pass 38 , fail 1 ( http://factory.couchbase.com//job/testrunner-Jasmin Rangel-sherlock/6035/ )

need to update, install, or configure build tools, environment variables, ssh credentials (requires no code change) ( http://factory.couchbase.com//job/testrunner-Jasmin Rangel-sherlock/6035/ )

-------------------------------------
author: Angelina Mayer
date: 2015-10-14 22:13:02.610000000

Patch Set 2:

(23 comments)

Line:19, pytests/fts/es_base.py -> Why are all the above static variables? Instance variables are defined using self. under init()

Line:23, pytests/fts/es_base.py -> In testrunner, to manage nodal info, we use TestInputServer class. Pls see how to import and pass the instance. Alternatively, use a constant for port, i don't see us changing the default port for ES in our tests, in which case, you can just pass IP as string.

Line:32, pytests/fts/es_base.py -> In python, empty strings need not be declared explicitly. And in any case, if you are initializing a variable before referencing it, you can skip initializing to null/default values.

Line:40, pytests/fts/es_base.py -> return False or raise Exception? If you've planned for the caller to raise an exception, the callee may as well do it.

Line:53, pytests/fts/es_base.py -> Use IP form for uniformity. 127.0.0.1.

Line:57, pytests/fts/es_base.py -> use the logger you have imported. Prints, warnings can be replaced with log.info and log.warn

Line:61, pytests/fts/es_base.py -> I see that you have raised an Elasticsearch Exception below. You may want to do the same, print the exception also.

Line:67, pytests/fts/es_base.py -> There should be a clean way of disconnecting ES client from Server.

Server process must not be killed after every test. Bringing up a clean server at the beginning of the next test calls for unrequired complexity.

Line:69, pytests/fts/es_base.py -> unlike Java, Python devs usually use underscored lower case for method naming.

Line:72, pytests/fts/es_base.py -> "index="not required unless it is not the first argument in the callee

Line:74, pytests/fts/es_base.py -> print the exception also

Line:83, pytests/fts/es_base.py -> Thinking about it, we will need a ESDocLoaderTask class like -
LoadDocumentsGeneratorsTask in tasks.py which can handle
1. loading in the background given generator.
2. load into multiple indexes in parallel.

Line:84, pytests/fts/es_base.py -> len() need not be used. Python allows us to do just:
if not indexType:
which equals:
if len(indexName) = 0

Line:108, pytests/fts/es_base.py -> we may not use this one, but it's ok to keep it.

Line:130, pytests/fts/es_base.py -> break the line as per pep8 standards

Line:139, pytests/fts/es_base.py -> the method name does not read well. Did you mean get_doc_inserts?

Line:162, pytests/fts/es_base.py -> to much space between def and method name

Line:181, pytests/fts/es_base.py -> use logger

Line:188, pytests/fts/es_base.py -> pep8 line break

Line:196, pytests/fts/es_base.py -> follow pep8

Line:203, pytests/fts/es_base.py -> Add a newline

Line:232, pytests/fts/es_base.py -> what are the possible values? Pls add in comment.

Line:247, pytests/fts/es_base.py -> pls add a method to delete all indices, will be useful during teardown phase of tests.

-------------------------------------
author: Angelina Mayer
date: 2015-10-29 18:19:11.705000000

Patch Set 3: Patch Set 2 was rebased

-------------------------------------
author: Tate Garrett
date: 2015-11-09 19:20:06.262000000

Change has been successfully cherry-picked as 33dd081f84d18e2d353abcea7047485c4de63e11

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