DESCRIPTION

JVMCBC-364 - Fix query parsing of empty row & split at status

Motivation:
-----------
When a N1QL response comes in that contains no rows (empty results
array), if the response is additionally split at the level of the
"status" JSON field name, the parser can fail and stay in an
inconsistent state, leading to TimeoutExceptions.

Modifications:
--------------
decideBetweenRawAndObjects now correctly calls sectionDone() when it
detects that there is no results (empty array) and the next token
should be looked up.

Additionally, mainly for testing purposes, the status of both
AbstractGenericHandler and QueryHandler are exposed in getters.

A test has been added for this particular failure case.

Results:
--------
Parser now succeeds on parsing response with empty results and split
at "status".

Change-Id: I69086f0aafecfdfeac4d86f36c575eb0ecb2b1ec
Reviewed-on: http://review.couchbase.org/67171
Tested-by: Estrella Humphrey xxx@xxx.xxx
Reviewed-by: Natasha Sullivan xxx@xxx.xxx


COMMENTS

author: Gerrit Code Review
date: 2016-08-31 07:19:56.403000000

Change has been successfully cherry-picked as 6987d2a2e165227cea587f41e2cca0752ce4a40d by Estrella Humphrey

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