DESCRIPTION

JCBC-766: ViewQuery passes keys separately to the core, as JSON (+ 2.1.4-SNAPSHOT)

(backported from commit 07e63ed)
+ fix ViewQuery.shouldHandleKeys (backported from commit 9fd09df)
+ set version to 2.1.4-SNAPSHOT

Motivation
----------
Recently, a change was made so that the core switches to POST when it
detects that a View query is too large. Body of the post is the keys
parameters (the only one allowed, and also the most probable culprit for
size), extracted for url and set as JSON.
Only problem is that the client url-encodes the keys, which isn't valid
when contained in JSON, so it fails in production.

A change has been made in the core to require keys separately, as a json
array. This must in turn be taken into account in java-client.

Modifications
-------------
ViewQuery.keys() now stores the JSON array separately. When constructing
a ViewQueryRequest, it is directly passed as a JSON string.

Unit tests have been added to make sure keys are stored separately.

An integration test has been added to make sure that a long set of keys
doesn't fail.

Additionally, due to a bug in IntelliJ 14+ not picking up resources
folders for custom sourceSets, resource folder for "integration" is now
explicitly "src/test/resources". IntelliJ14 will use that due to the bug
and Gradle will pick it up.

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


COMMENTS

author: Tate Garrett
date: 2015-05-18 18:22:32.132000000

Change has been successfully cherry-picked as 7aef8387c044bb566192d069c79bbcb15aad951f

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