File tree Expand file tree Collapse file tree 3 files changed +35
-4
lines changed
src/test/java/org/elasticsearch/xpack/esql Expand file tree Collapse file tree 3 files changed +35
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,9 @@ dependencies {
2828 // Also contains a dummy processor to allow compilation with unused annotations.
2929 annotationProcessor project(' compute:gen' )
3030
31- testImplementation project(' qa:testFixtures' )
31+ testImplementation(project(' qa:testFixtures' )) {
32+ exclude(group :" org.elasticsearch.plugin" , module : " esql" )
33+ }
3234 testImplementation project(' :test:framework' )
3335 testImplementation(testArtifact(project(xpackModule(' core' ))))
3436 testImplementation project(path : xpackModule(' enrich' ))
Original file line number Diff line number Diff line change 11apply plugin : ' elasticsearch.java'
2-
2+ apply plugin : org.elasticsearch.gradle.dependencies.CompileOnlyResolvePlugin
33
44dependencies {
55 implementation project(' :x-pack:plugin:esql:compute' )
6- compileOnly project(' :x-pack:plugin:esql' )
6+ implementation project(' :x-pack:plugin:esql' )
77 compileOnly project(path : xpackModule(' core' ))
88 implementation project(" :libs:elasticsearch-x-content" )
99 implementation project(' :client:rest' )
1010 implementation project(' :libs:elasticsearch-logging' )
1111 implementation project(' :test:framework' )
1212 api(testArtifact(project(xpackModule(' esql-core' ))))
1313 implementation project(' :server' )
14- api " net.sf.supercsv:super-csv:${ versions.supercsv} "
14+ implementation " net.sf.supercsv:super-csv:${ versions.supercsv} "
15+ }
16+
17+ /**
18+ * This is needed for CsvTestsDataLoaderTests to reflect the classpath that CsvTestsDataLoader actually uses when "main" method is executed.
19+ */
20+ tasks. named(" test" ). configure {
21+ classpath = classpath - (configurations. resolveableCompileOnly - configurations. runtimeClasspath)
1522}
1623
1724/**
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+ * or more contributor license agreements. Licensed under the Elastic License
4+ * 2.0; you may not use this file except in compliance with the Elastic License
5+ * 2.0.
6+ */
7+
8+ package org .elasticsearch .xpack .esql ;
9+
10+ import org .elasticsearch .test .ESTestCase ;
11+
12+ import java .net .ConnectException ;
13+
14+ import static org .hamcrest .Matchers .startsWith ;
15+
16+ public class CsvTestsDataLoaderTests extends ESTestCase {
17+
18+ public void testCsvTestsDataLoaderExecution () {
19+ ConnectException ce = expectThrows (ConnectException .class , () -> CsvTestsDataLoader .main (new String [] {}));
20+ assertThat (ce .getMessage (), startsWith ("Connection refused" ));
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments