30
30
import org .junit .jupiter .api .BeforeAll ;
31
31
import org .junit .jupiter .api .BeforeEach ;
32
32
import org .junit .jupiter .api .extension .ExtendWith ;
33
+ import org .slf4j .Logger ;
34
+ import org .slf4j .LoggerFactory ;
33
35
import org .springframework .data .couchbase .CouchbaseClientFactory ;
34
36
import org .springframework .data .couchbase .SimpleCouchbaseClientFactory ;
35
37
36
38
import com .couchbase .client .core .env .Authenticator ;
37
39
import com .couchbase .client .core .env .PasswordAuthenticator ;
38
40
import com .couchbase .client .core .env .SeedNode ;
41
+ import com .couchbase .client .core .error .IndexFailureException ;
39
42
import com .couchbase .client .java .manager .query .CreatePrimaryQueryIndexOptions ;
40
43
import com .couchbase .client .java .manager .query .CreateQueryIndexOptions ;
41
44
48
51
public abstract class ClusterAwareIntegrationTests {
49
52
50
53
private static TestClusterConfig testClusterConfig ;
54
+ private static final Logger LOGGER = LoggerFactory .getLogger (ClusterAwareIntegrationTests .class );
51
55
52
56
@ BeforeAll
53
57
static void setup (TestClusterConfig config ) {
@@ -62,6 +66,8 @@ static void setup(TestClusterConfig config) {
62
66
couchbaseClientFactory .getCluster ().queryIndexes ().createIndex (bucketName (), "parent_idx" , fieldList ,
63
67
CreateQueryIndexOptions .createQueryIndexOptions ().ignoreIfExists (true ));
64
68
// .with("_class", "org.springframework.data.couchbase.domain.Address"));
69
+ } catch (IndexFailureException ife ) {
70
+ LOGGER .warn ("IndexFailureException occurred - ignoring: " , ife );
65
71
} catch (IOException ioe ) {
66
72
throw new RuntimeException (ioe );
67
73
}
0 commit comments