DESCRIPTION

JVMCBC-418 Add mock support for kv error map integration test

Motivation
----------
Use CouchbaseMock to test kv error map and allow configurable mock settings as properties

Changes
-------
- Add dependency to CouchbaseMock which is hosted in snapshots.couchbase.com.
- Add basic structure for testing kv error map as it is still not used
by the client.
- Expose error map from ResponseStatusConverter.
- Read properties file test.properties to check if mock is enabled and
also mock related settings.

Results
-------
Now mock can be used for testing kv error map.

Change-Id: Iab681891f26b86007073b82ad3df3b328ee088af


COMMENTS

author: Marques Ellis
date: 2017-04-18 23:41:48.731000000

Uploaded patch set 5.

-------------------------------------
author: Marques Ellis
date: 2017-04-18 23:42:02.555000000

Patch Set 5: Verified+1

-------------------------------------
author: Natasha Sullivan
date: 2017-04-20 06:47:24.746000000

Patch Set 5: Code-Review-1

(4 comments)

Line:88, src/integration/java/com/couchbase/client/core/util/ClusterDependentTest.java -> I guess this could be avoided when going through TestProperties?

Line:96, src/integration/java/com/couchbase/client/core/util/ClusterDependentTest.java -> I would find it better if we could refactor the mock-related helper methods to a separate class in the util namespace and this class then calls the helper functions

(so that semantically we can "start", "stop" and work with a mock where all the functionality needed is encapsulated)

Line:1, src/integration/resources/com.couchbase.client.core.integration.properties -> don't we have the util.TestProperties for that where we add the default settings and pull it out of sys properties otherwise?

Line:32, src/integration/java/com/couchbase/client/core/cluster/KeyValueErrorMapTest.java -> I wonder if we need a way to conditionally run the mock for a test suite? Since globally it won't work since the mock doesn't support everything we test in the full suite...

so spawn the mock, run the suite, shut it down, move on... also then we need to make sure that a mock can run side by side on separate ports than a running cb server install locally

-------------------------------------
author: Marques Ellis
date: 2017-04-27 20:10:38.688000000

MISMATCHED INLINE COMMENT
Line:96, src/integration/java/com/couchbase/client/core/util/ClusterDependentTest.java -> Yes I can do that refactoring, but

-------------------------------------
author: Marques Ellis
date: 2017-04-27 20:10:38.688000000

MISMATCHED INLINE COMMENT
Line:1, src/integration/resources/com.couchbase.client.core.integration.properties -> Yes we do, I like the use of properties file instead of command line.
Shall I move all test properties to the file. 
wdyt?

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