1
1
/*
2
- * Copyright 2013-2021 the original author or authors.
2
+ * Copyright 2023 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
6
6
* You may obtain a copy of the License at
7
7
*
8
- * https ://www.apache.org/licenses/LICENSE-2.0
8
+ * http ://www.apache.org/licenses/LICENSE-2.0
9
9
*
10
10
* Unless required by applicable law or agreed to in writing, software
11
11
* distributed under the License is distributed on an "AS IS" BASIS,
18
18
import static org .assertj .core .api .Assertions .*;
19
19
import static org .assertj .core .api .Assumptions .*;
20
20
21
- import java .util .stream .LongStream ;
22
-
23
21
import example .springdata .cassandra .util .CassandraKeyspace ;
24
22
import example .springdata .cassandra .util .CassandraVersion ;
25
23
24
+ import java .util .stream .LongStream ;
25
+
26
26
import org .junit .jupiter .api .BeforeEach ;
27
27
import org .junit .jupiter .api .Test ;
28
28
@@ -112,7 +112,8 @@ void findByDerivedQueryMethodWithSASI() throws InterruptedException {
112
112
113
113
assumeThat (CassandraVersion .getReleaseVersion (session ).isGreaterThanOrEqualTo (CASSANDRA_3_4 )).isTrue ();
114
114
115
- session .execute ("CREATE CUSTOM INDEX ON users (lname) USING 'org.apache.cassandra.index.sasi.SASIIndex';" );
115
+ session .execute (
116
+ "CREATE CUSTOM INDEX IF NOT EXISTS users_lname_idx_1 ON users (lname) USING 'org.apache.cassandra.index.sasi.SASIIndex';" );
116
117
/*
117
118
Cassandra secondary indexes are created in the background without the possibility to check
118
119
whether they are available or not. So we are forced to just wait. *sigh*
@@ -132,7 +133,8 @@ void limitResultSize() throws InterruptedException {
132
133
133
134
assumeThat (CassandraVersion .getReleaseVersion (session ).isGreaterThanOrEqualTo (CASSANDRA_3_4 )).isTrue ();
134
135
135
- session .execute ("CREATE CUSTOM INDEX ON users (lname) USING 'org.apache.cassandra.index.sasi.SASIIndex';" );
136
+ session .execute (
137
+ "CREATE CUSTOM INDEX IF NOT EXISTS users_lname_idx_1 ON users (lname) USING 'org.apache.cassandra.index.sasi.SASIIndex';" );
136
138
/*
137
139
Cassandra secondary indexes are created in the background without the possibility to check
138
140
whether they are available or not. So we are forced to just wait. *sigh*
0 commit comments