DESCRIPTION

JCBC-988: Test ctx createIfMissing, bucketSample

Motivation
----------
When using sample bucket in an integration test, if the sample isn't
loaded, the CouchbaseTestContext will create a small bucket.

That can lead to puzzling test errors as such test will offen assume
sample data to be present in bucket, while it will be empty in the
case above.

Creating a bucket if it is missing should be tunable, and an easy way
of forcing that to false should be offered for sample buckets.

Modifications
-------------
Added a createIfMissing method to choose between automatic creation or
throwing an exception when the requested bucket is missing.

Added a bucketSample method to express that a sample bucket must be
used. This is equivalent to createIfMissing(false) + adhoc(false) +
flushOnInit(false) + bucketName(sampleName) + bucketPassword("").

Result
------
Tests that use a sample are less likely to fail in odd ways when the
sample bucket hasn't been loaded, and instead fail fast at init time.

Change-Id: I6f5bf17c226c9626a9c20f84421546063a4c04db


COMMENTS

author: Estrella Humphrey
date: 2016-07-22 09:04:57.602000000

Uploaded patch set 1.

-------------------------------------
author: Estrella Humphrey
date: 2016-07-22 09:08:50.637000000

Patch Set 1: Verified+1

-------------------------------------
author: Natasha Sullivan
date: 2016-07-22 09:17:34.382000000

Patch Set 1: Code-Review-1

(2 comments)

Line:183, src/integration/java/com/couchbase/client/java/util/CouchbaseTestContext.java -> createBucketIfMissing ?

Line:244, src/integration/java/com/couchbase/client/java/util/CouchbaseTestContext.java -> sampleBucket ? I know they all start with bucket but this reads weird :D

-------------------------------------
author: Tate Garrett
date: 2016-07-22 09:49:05.211000000

Change has been successfully cherry-picked as 08abd6a4c9ae407704b8e6bd0674bf7ab95e5389 by Estrella Humphrey

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