DESCRIPTION

Increase test coverage for the KeyValueSelectBucketHandler.

Motivation
----------
This changeset adds a couple of simple test cases to verify the in and output
of the KeyValueSelectBucketHandler.

Change-Id: I6695f385fe389213b1d952bbc180ebbc0b6cfaf9


COMMENTS

author: Natasha Sullivan
date: 2017-09-28 12:20:56.130000000

Uploaded patch set 1.

-------------------------------------
author: Hugo Blankenship
date: 2017-09-28 12:21:03.563000000

Patch Set 1:

Build Started http://sdkbuilds.sc.couchbase.com/job/couchbase-jvm-core-test/90/

-------------------------------------
author: Hugo Blankenship
date: 2017-09-28 12:23:40.194000000

Patch Set 1: Verified-1

Build Failed 

http://sdkbuilds.sc.couchbase.com/job/couchbase-jvm-core-test/90/ : FAILURE

-------------------------------------
author: Hugo Blankenship
date: 2017-09-28 12:59:06.463000000

Patch Set 1:

Build Started http://sdkbuilds.sc.couchbase.com/job/couchbase-jvm-core-test/92/

-------------------------------------
author: Hugo Blankenship
date: 2017-09-28 13:00:45.022000000

Patch Set 1: Verified+1

Build Successful 

http://sdkbuilds.sc.couchbase.com/job/couchbase-jvm-core-test/92/ : SUCCESS

-------------------------------------
author: Carmen Buckley
date: 2017-09-29 17:49:00.740000000

Patch Set 1: Code-Review+2

(3 comments)

Line:48, src/test/java/com/couchbase/client/core/endpoint/kv/KeyValueSelectBucketHandlerTest.java -> Instead of magic number, worth raising visibility of KeyValueSelectBucketHandler.SELECT_BUCKET_OPCODE to package protected?

Line:49, src/test/java/com/couchbase/client/core/endpoint/kv/KeyValueSelectBucketHandlerTest.java -> Is there a reason not to check whether the key and body are actually "bucket" ?

    assertEquals("bucket", new String(request.getKey(), CharsetUtil.UTF_8));

Not sure how to get the body of the request though...

Line:95, src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueSelectBucketHandler.java -> Since this c'tor is for testing, would it make sense for it to be package protected?

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