DATACOUCH-260 - Update to 2.4.1 and fix tests

Adapted changes to 3.0 branch

Original pull request: #131.
This commit is contained in:
Subhashni Balakrishnan
2017-02-04 21:30:46 -08:00
parent 8733ea3cf5
commit 162d8124ab
17 changed files with 137 additions and 87 deletions

View File

@@ -79,8 +79,6 @@ public class CouchbaseEnvironmentParserTest {
assertThat(env.sslEnabled(), allOf(equalTo(true), not(defaultEnv.sslEnabled())));
assertThat(env.sslKeystoreFile(), is(equalTo("test")));
assertThat(env.sslKeystorePassword(), is(equalTo("test")));
assertThat(env.queryEnabled(), allOf(equalTo(true), not(defaultEnv.queryEnabled())));
assertThat(env.queryPort(), is(equalTo(7)));
assertThat(env.bootstrapHttpEnabled(), allOf(equalTo(false), not(defaultEnv.bootstrapHttpEnabled())));
assertThat(env.bootstrapCarrierEnabled(), allOf(equalTo(false), not(defaultEnv.bootstrapCarrierEnabled())));
assertThat(env.bootstrapHttpDirectPort(), is(equalTo(8)));

View File

@@ -75,7 +75,7 @@ public class RepositoryIndexUsageTest {
@Test
public void testFindAllUsesViewWithConfiguredConsistency() {
String expectedQueryParams = "reduce=false&stale=false";
String expectedQueryParams = "ViewQuery(string/all){params=\"reduce=false&stale=false\"}";
repository.findAll();
verify(couchbaseOperations, never()).queryView(any(ViewQuery.class));
@@ -89,7 +89,7 @@ public class RepositoryIndexUsageTest {
@Test
public void testFindAllKeysUsesViewWithConfiguredConsistency() {
String expectedQueryParams = "reduce=false&stale=false";
String expectedQueryParams = "ViewQuery(string/all){params=\"reduce=false&stale=false\", keys=\"[\"someKey\"]\"}";
repository.findAll(Collections.singleton("someKey"));
verify(couchbaseOperations, never()).queryView(any(ViewQuery.class));
@@ -103,7 +103,7 @@ public class RepositoryIndexUsageTest {
@Test
public void testCountUsesViewWithConfiguredConsistencyAndReduces() {
String expectedQueryParams = "reduce=true&stale=false";
String expectedQueryParams = "ViewQuery(string/all){params=\"reduce=true&stale=false\"}";
repository.count();
verify(couchbaseOperations, never()).findByView(any(ViewQuery.class), any(Class.class));
@@ -123,7 +123,7 @@ public class RepositoryIndexUsageTest {
@Test
public void testDeleteAllUsesViewWithConfiguredConsistency() {
String expectedQueryParams = "reduce=false&stale=false";
String expectedQueryParams = "ViewQuery(string/all){params=\"reduce=false&stale=false\"}";
repository.deleteAll();
verify(couchbaseOperations, never()).findByView(any(ViewQuery.class), any(Class.class));