Skip to content

Commit b9fa1c7

Browse files
authored
Fix test failure against mocked. (#1227)
Closes #1226.
1 parent 1e774d4 commit b9fa1c7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/java/org/springframework/data/couchbase/util/ClusterAwareIntegrationTests.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,15 @@
3030
import org.junit.jupiter.api.BeforeAll;
3131
import org.junit.jupiter.api.BeforeEach;
3232
import org.junit.jupiter.api.extension.ExtendWith;
33+
import org.slf4j.Logger;
34+
import org.slf4j.LoggerFactory;
3335
import org.springframework.data.couchbase.CouchbaseClientFactory;
3436
import org.springframework.data.couchbase.SimpleCouchbaseClientFactory;
3537

3638
import com.couchbase.client.core.env.Authenticator;
3739
import com.couchbase.client.core.env.PasswordAuthenticator;
3840
import com.couchbase.client.core.env.SeedNode;
41+
import com.couchbase.client.core.error.IndexFailureException;
3942
import com.couchbase.client.java.manager.query.CreatePrimaryQueryIndexOptions;
4043
import com.couchbase.client.java.manager.query.CreateQueryIndexOptions;
4144

@@ -48,6 +51,7 @@
4851
public abstract class ClusterAwareIntegrationTests {
4952

5053
private static TestClusterConfig testClusterConfig;
54+
private static final Logger LOGGER = LoggerFactory.getLogger(ClusterAwareIntegrationTests.class);
5155

5256
@BeforeAll
5357
static void setup(TestClusterConfig config) {
@@ -62,6 +66,8 @@ static void setup(TestClusterConfig config) {
6266
couchbaseClientFactory.getCluster().queryIndexes().createIndex(bucketName(), "parent_idx", fieldList,
6367
CreateQueryIndexOptions.createQueryIndexOptions().ignoreIfExists(true));
6468
// .with("_class", "org.springframework.data.couchbase.domain.Address"));
69+
} catch (IndexFailureException ife) {
70+
LOGGER.warn("IndexFailureException occurred - ignoring: ", ife);
6571
} catch (IOException ioe) {
6672
throw new RuntimeException(ioe);
6773
}

0 commit comments

Comments
 (0)