From 24d252e32245c04a49565e6ab11e451fa14e4166 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 17 May 2021 12:05:06 +0100 Subject: [PATCH] Upgrade to Couchbase Client 3.1.5 Closes gh-26531 --- .../couchbase/CouchbaseAutoConfigurationTests.java | 6 +++--- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- .../data/couchbase/SampleCouchbaseApplicationTests.java | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/couchbase/CouchbaseAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/couchbase/CouchbaseAutoConfigurationTests.java index d43a5188c9..bec1f367bb 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/couchbase/CouchbaseAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/couchbase/CouchbaseAutoConfigurationTests.java @@ -79,8 +79,8 @@ class CouchbaseAutoConfigurationTests { context.getBean(ObjectMapper.class).getRegisteredModuleIds()); expectedModuleIds.add(new JsonValueModule().getTypeId()); JsonSerializer serializer = env.jsonSerializer(); - assertThat(serializer).isInstanceOf(JacksonJsonSerializer.class).extracting("mapper") - .asInstanceOf(InstanceOfAssertFactories.type(ObjectMapper.class)) + assertThat(serializer).extracting("wrapped").isInstanceOf(JacksonJsonSerializer.class) + .extracting("mapper").asInstanceOf(InstanceOfAssertFactories.type(ObjectMapper.class)) .extracting(ObjectMapper::getRegisteredModuleIds).isEqualTo(expectedModuleIds); }); } @@ -95,7 +95,7 @@ class CouchbaseAutoConfigurationTests { .withPropertyValues("spring.couchbase.connection-string=localhost").run((context) -> { ClusterEnvironment env = context.getBean(ClusterEnvironment.class); JsonSerializer serializer = env.jsonSerializer(); - assertThat(serializer).isSameAs(customJsonSerializer); + assertThat(serializer).extracting("wrapped").isSameAs(customJsonSerializer); }); } diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 3067acd211..b258b17168 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -215,7 +215,7 @@ bom { ] } } - library("Couchbase Client", "3.1.4") { + library("Couchbase Client", "3.1.5") { group("com.couchbase.client") { modules = [ "java-client" diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/test/java/smoketest/data/couchbase/SampleCouchbaseApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/test/java/smoketest/data/couchbase/SampleCouchbaseApplicationTests.java index b489c7bd42..8c70795a9c 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/test/java/smoketest/data/couchbase/SampleCouchbaseApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-couchbase/src/test/java/smoketest/data/couchbase/SampleCouchbaseApplicationTests.java @@ -16,7 +16,7 @@ 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.extension.ExtendWith; @@ -46,10 +46,10 @@ class SampleCouchbaseApplicationTests { private boolean serverNotRunning(RuntimeException ex) { NestedCheckedException nested = new NestedCheckedException("failed", ex) { }; - if (nested.contains(FeatureNotAvailableException.class)) { + if (nested.contains(AmbiguousTimeoutException.class)) { Throwable root = nested.getRootCause(); // 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; } }