File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
qa/ccs-unavailable-clusters
src/javaRestTest/java/org/elasticsearch/search Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 6
6
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7
7
* License v3.0 only", or the "Server Side Public License, v 1".
8
8
*/
9
- apply plugin : ' elasticsearch.legacy-java-rest-test'
10
9
11
- testClusters. matching { it. name == " javaRestTest" }. configureEach {
12
- setting ' xpack.security.enabled' , ' true'
13
- user username : ' admin' , password : ' admin-password' , role : ' superuser'
10
+ import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask
11
+
12
+ apply plugin : ' elasticsearch.internal-java-rest-test'
13
+
14
+
15
+ tasks. withType(StandaloneRestIntegTestTask ) {
16
+ usesDefaultDistribution()
14
17
}
Original file line number Diff line number Diff line change 38
38
import org .elasticsearch .common .util .concurrent .EsExecutors ;
39
39
import org .elasticsearch .common .util .concurrent .ThreadContext ;
40
40
import org .elasticsearch .search .aggregations .InternalAggregations ;
41
+ import org .elasticsearch .test .cluster .ElasticsearchCluster ;
41
42
import org .elasticsearch .test .rest .ESRestTestCase ;
42
43
import org .elasticsearch .test .rest .ObjectPath ;
43
44
import org .elasticsearch .test .transport .MockTransportService ;
44
45
import org .elasticsearch .threadpool .TestThreadPool ;
45
46
import org .elasticsearch .threadpool .ThreadPool ;
46
47
import org .elasticsearch .xcontent .XContentBuilder ;
47
48
import org .elasticsearch .xcontent .json .JsonXContent ;
49
+ import org .junit .ClassRule ;
48
50
49
51
import java .io .IOException ;
50
52
import java .util .Collections ;
@@ -61,6 +63,14 @@ public class CrossClusterSearchUnavailableClusterIT extends ESRestTestCase {
61
63
62
64
private final ThreadPool threadPool = new TestThreadPool (getClass ().getName ());
63
65
66
+ @ ClassRule
67
+ public static ElasticsearchCluster cluster = ElasticsearchCluster .local ().build ();
68
+
69
+ @ Override
70
+ protected String getTestRestCluster () {
71
+ return cluster .getHttpAddresses ();
72
+ }
73
+
64
74
@ Override
65
75
public void tearDown () throws Exception {
66
76
super .tearDown ();
You can’t perform that action at this time.
0 commit comments