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 055112021d..8ccc868832 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,7 @@ */ package smoketest.data.couchbase; -import java.net.ConnectException; - +import com.couchbase.client.core.error.FeatureNotAvailableException; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -47,9 +46,10 @@ class SampleCouchbaseApplicationTests { @SuppressWarnings("serial") NestedCheckedException nested = new NestedCheckedException("failed", ex) { }; - if (nested.contains(ConnectException.class)) { + if (nested.contains(FeatureNotAvailableException.class)) { Throwable root = nested.getRootCause(); - if (root.getMessage().contains("Connection refused")) { + // 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")) { return true; } }