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 66 * your election, the "Elastic License 2.0", the "GNU Affero General Public 
77 * License v3.0 only", or the "Server Side Public License, v 1". 
88 */  
9- apply plugin : ' elasticsearch.legacy-java-rest-test' 
109
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()
1417}
Original file line number Diff line number Diff line change 3838import  org .elasticsearch .common .util .concurrent .EsExecutors ;
3939import  org .elasticsearch .common .util .concurrent .ThreadContext ;
4040import  org .elasticsearch .search .aggregations .InternalAggregations ;
41+ import  org .elasticsearch .test .cluster .ElasticsearchCluster ;
4142import  org .elasticsearch .test .rest .ESRestTestCase ;
4243import  org .elasticsearch .test .rest .ObjectPath ;
4344import  org .elasticsearch .test .transport .MockTransportService ;
4445import  org .elasticsearch .threadpool .TestThreadPool ;
4546import  org .elasticsearch .threadpool .ThreadPool ;
4647import  org .elasticsearch .xcontent .XContentBuilder ;
4748import  org .elasticsearch .xcontent .json .JsonXContent ;
49+ import  org .junit .ClassRule ;
4850
4951import  java .io .IOException ;
5052import  java .util .Collections ;
@@ -61,6 +63,14 @@ public class CrossClusterSearchUnavailableClusterIT extends ESRestTestCase {
6163
6264    private  final  ThreadPool  threadPool  = new  TestThreadPool (getClass ().getName ());
6365
66+     @ ClassRule 
67+     public  static  ElasticsearchCluster  cluster  = ElasticsearchCluster .local ().build ();
68+ 
69+     @ Override 
70+     protected  String  getTestRestCluster () {
71+         return  cluster .getHttpAddresses ();
72+     }
73+ 
6474    @ Override 
6575    public  void  tearDown () throws  Exception  {
6676        super .tearDown ();
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments