Commit 24d252e3 authored by Andy Wilkinson's avatar Andy Wilkinson

Upgrade to Couchbase Client 3.1.5

Closes gh-26531
parent 78f70440
...@@ -79,8 +79,8 @@ class CouchbaseAutoConfigurationTests { ...@@ -79,8 +79,8 @@ class CouchbaseAutoConfigurationTests {
context.getBean(ObjectMapper.class).getRegisteredModuleIds()); context.getBean(ObjectMapper.class).getRegisteredModuleIds());
expectedModuleIds.add(new JsonValueModule().getTypeId()); expectedModuleIds.add(new JsonValueModule().getTypeId());
JsonSerializer serializer = env.jsonSerializer(); JsonSerializer serializer = env.jsonSerializer();
assertThat(serializer).isInstanceOf(JacksonJsonSerializer.class).extracting("mapper") assertThat(serializer).extracting("wrapped").isInstanceOf(JacksonJsonSerializer.class)
.asInstanceOf(InstanceOfAssertFactories.type(ObjectMapper.class)) .extracting("mapper").asInstanceOf(InstanceOfAssertFactories.type(ObjectMapper.class))
.extracting(ObjectMapper::getRegisteredModuleIds).isEqualTo(expectedModuleIds); .extracting(ObjectMapper::getRegisteredModuleIds).isEqualTo(expectedModuleIds);
}); });
} }
...@@ -95,7 +95,7 @@ class CouchbaseAutoConfigurationTests { ...@@ -95,7 +95,7 @@ class CouchbaseAutoConfigurationTests {
.withPropertyValues("spring.couchbase.connection-string=localhost").run((context) -> { .withPropertyValues("spring.couchbase.connection-string=localhost").run((context) -> {
ClusterEnvironment env = context.getBean(ClusterEnvironment.class); ClusterEnvironment env = context.getBean(ClusterEnvironment.class);
JsonSerializer serializer = env.jsonSerializer(); JsonSerializer serializer = env.jsonSerializer();
assertThat(serializer).isSameAs(customJsonSerializer); assertThat(serializer).extracting("wrapped").isSameAs(customJsonSerializer);
}); });
} }
......
...@@ -215,7 +215,7 @@ bom { ...@@ -215,7 +215,7 @@ bom {
] ]
} }
} }
library("Couchbase Client", "3.1.4") { library("Couchbase Client", "3.1.5") {
group("com.couchbase.client") { group("com.couchbase.client") {
modules = [ modules = [
"java-client" "java-client"
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
package smoketest.data.couchbase; package smoketest.data.couchbase;
import com.couchbase.client.core.error.FeatureNotAvailableException; import com.couchbase.client.core.error.AmbiguousTimeoutException;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
...@@ -46,10 +46,10 @@ class SampleCouchbaseApplicationTests { ...@@ -46,10 +46,10 @@ class SampleCouchbaseApplicationTests {
private boolean serverNotRunning(RuntimeException ex) { private boolean serverNotRunning(RuntimeException ex) {
NestedCheckedException nested = new NestedCheckedException("failed", ex) { NestedCheckedException nested = new NestedCheckedException("failed", ex) {
}; };
if (nested.contains(FeatureNotAvailableException.class)) { if (nested.contains(AmbiguousTimeoutException.class)) {
Throwable root = nested.getRootCause(); Throwable root = nested.getRootCause();
// This is not ideal, we should have a better way to know what is going on // This is not ideal, we should have a better way to know what is going on
if (root.getMessage().contains("The cluster does not support cluster-level queries")) { if (root.getMessage().contains("QueryRequest, Reason: TIMEOUT")) {
return true; return true;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment