Skip to content

Commit

Permalink
Upgrade to Couchbase Client 3.1.5
Browse files Browse the repository at this point in the history
Closes gh-26531
  • Loading branch information
wilkinsona committed May 17, 2021
1 parent 78f7044 commit 24d252e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ void whenObjectMapperBeanIsDefinedThenClusterEnvironmentObjectMapperIsDerivedFro
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);
});
}
Expand All @@ -95,7 +95,7 @@ void customizeJsonSerializer() {
.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);
});
}

Expand Down
2 changes: 1 addition & 1 deletion spring-boot-project/spring-boot-dependencies/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ bom {
]
}
}
library("Couchbase Client", "3.1.4") {
library("Couchbase Client", "3.1.5") {
group("com.couchbase.client") {
modules = [
"java-client"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -46,10 +46,10 @@ void testDefaultSettings(CapturedOutput output) {
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;
}
}
Expand Down

0 comments on commit 24d252e

Please sign in to comment.