DESCRIPTION

JCBC-988: Add createBucketIfMissing, sampleBucket

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 often 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 createBucketIfMissing method to choose between automatic
creation or throwing an exception when the requested bucket is
missing.

Added a sampleBucket method to express that a sample bucket must be
used. This is equivalent to createBucketIfMissing(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
Reviewed-on: http://review.couchbase.org/66087
Tested-by: Estrella Humphrey xxx@xxx.xxx
Reviewed-by: Natasha Sullivan xxx@xxx.xxx


COMMENTS

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

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

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