Skip to content

Commit fdd7a83

Browse files
committed
Gradle 7.4.2
Move tests to junit jupiter Minor libs upgrade: elasticsearch 7.17.3 jackson 2.13.2 jakarta.json-api 2.1.0 parsson 1.1.0 yasson 2.0.4 classgraph 4.8.146 testcontainers 1.17.1
1 parent 2f0b5f6 commit fdd7a83

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+99
-151
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ gradle-app.setting
1616
# IntelliJ Idea
1717
.idea
1818
*.iml
19+
out
1920

2021
.ci/output
2122

gradle/wrapper/gradle-wrapper.jar

293 Bytes
Binary file not shown.
Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
1-
#
2-
# Licensed to Elasticsearch B.V. under one or more contributor
3-
# license agreements. See the NOTICE file distributed with
4-
# this work for additional information regarding copyright
5-
# ownership. Elasticsearch B.V. licenses this file to you under
6-
# the Apache License, Version 2.0 (the "License"); you may
7-
# not use this file except in compliance with the License.
8-
# You may obtain a copy of the License at
9-
#
10-
# http://www.apache.org/licenses/LICENSE-2.0
11-
#
12-
# Unless required by applicable law or agreed to in writing,
13-
# software distributed under the License is distributed on an
14-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
# KIND, either express or implied. See the License for the
16-
# specific language governing permissions and limitations
17-
# under the License.
18-
#
19-
201
distributionBase=GRADLE_USER_HOME
212
distributionPath=wrapper/dists
22-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
234
zipStoreBase=GRADLE_USER_HOME
245
zipStorePath=wrapper/dists

gradlew

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
#!/usr/bin/env sh
22

3-
#
4-
# Licensed to Elasticsearch B.V. under one or more contributor
5-
# license agreements. See the NOTICE file distributed with
6-
# this work for additional information regarding copyright
7-
# ownership. Elasticsearch B.V. licenses this file to you under
8-
# the Apache License, Version 2.0 (the "License"); you may
9-
# not use this file except in compliance with the License.
10-
# You may obtain a copy of the License at
11-
#
12-
# http://www.apache.org/licenses/LICENSE-2.0
13-
#
14-
# Unless required by applicable law or agreed to in writing,
15-
# software distributed under the License is distributed on an
16-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17-
# KIND, either express or implied. See the License for the
18-
# specific language governing permissions and limitations
19-
# under the License.
20-
#
21-
223
#
234
# Copyright 2015 the original author or authors.
245
#
@@ -149,7 +130,7 @@ fi
149130
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
150131
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
151132
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
152-
133+
153134
JAVACMD=`cygpath --unix "$JAVACMD"`
154135

155136
# We build the pattern for arguments to be converted via cygpath

gradlew.bat

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4040

4141
set JAVA_EXE=java.exe
4242
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto init
43+
if "%ERRORLEVEL%" == "0" goto execute
4444

4545
echo.
4646
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -54,7 +54,7 @@ goto fail
5454
set JAVA_HOME=%JAVA_HOME:"=%
5555
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5656

57-
if exist "%JAVA_EXE%" goto init
57+
if exist "%JAVA_EXE%" goto execute
5858

5959
echo.
6060
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -64,29 +64,14 @@ echo location of your Java installation.
6464

6565
goto fail
6666

67-
:init
68-
@rem Get command-line arguments, handling Windows variants
69-
70-
if not "%OS%" == "Windows_NT" goto win9xME_args
71-
72-
:win9xME_args
73-
@rem Slurp the command line arguments.
74-
set CMD_LINE_ARGS=
75-
set _SKIP=2
76-
77-
:win9xME_args_slurp
78-
if "x%~1" == "x" goto execute
79-
80-
set CMD_LINE_ARGS=%*
81-
8267
:execute
8368
@rem Setup the command line
8469

8570
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
8671

8772

8873
@rem Execute Gradle
89-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
74+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
9075

9176
:end
9277
@rem End local scope for the variables with windows NT shell

java-client/build.gradle.kts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ plugins {
2626
`java-library`
2727
checkstyle
2828
`maven-publish`
29-
id("com.github.jk1.dependency-license-report") version "1.17"
30-
id("de.thetaphi.forbiddenapis") version "3.2"
29+
id("com.github.jk1.dependency-license-report") version "1.19"
30+
id("de.thetaphi.forbiddenapis") version "3.3"
3131
}
3232

3333
java {
@@ -171,8 +171,8 @@ publishing {
171171
dependencies {
172172
// Compile and test with the last 7.x version to make sure transition scenarios where
173173
// the Java API client coexists with a 7.x HLRC work fine
174-
val elasticsearchVersion = "7.17.1"
175-
val jacksonVersion = "2.13.1"
174+
val elasticsearchVersion = "7.17.3"
175+
val jacksonVersion = "2.13.2"
176176

177177
// Apache 2.0
178178
// https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-low.html
@@ -184,12 +184,12 @@ dependencies {
184184

185185
// EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
186186
// https://github.com/eclipse-ee4j/jsonp
187-
api("jakarta.json:jakarta.json-api:2.0.1")
187+
api("jakarta.json:jakarta.json-api:2.1.0")
188188

189189
// Needed even if using Jackson to have an implementation of the Jsonp object model
190190
// EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
191191
// https://github.com/eclipse-ee4j/parsson
192-
api("org.eclipse.parsson:parsson:1.0.0")
192+
api("org.eclipse.parsson:parsson:1.1.0")
193193

194194
// EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
195195
// https://github.com/eclipse-ee4j/jsonb-api
@@ -205,23 +205,24 @@ dependencies {
205205

206206
// EPL-2.0 OR BSD-3-Clause
207207
// https://eclipse-ee4j.github.io/yasson/
208-
testImplementation("org.eclipse", "yasson", "2.0.2") {
208+
testImplementation("org.eclipse", "yasson", "2.0.4") {
209209
// Exclude Glassfish as we use Parsson (basically Glassfish renamed in the Jakarta namespace).
210210
exclude(group = "org.glassfish", module = "jakarta.json")
211211
}
212212

213-
// EPL-1.0
214-
// https://junit.org/junit4/
215-
testImplementation("junit", "junit" , "4.13.2")
213+
// EPL-2.0
214+
// https://junit.org/junit5/
215+
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
216+
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
216217

217218
// MIT
218219
// https://github.com/classgraph/classgraph
219-
testImplementation("io.github.classgraph:classgraph:4.8.116")
220+
testImplementation("io.github.classgraph:classgraph:4.8.146")
220221

221222
// MIT
222223
// https://www.testcontainers.org/
223-
testImplementation("org.testcontainers", "testcontainers", "1.15.3")
224-
testImplementation("org.testcontainers", "elasticsearch", "1.15.3")
224+
testImplementation("org.testcontainers", "testcontainers", "1.17.1")
225+
testImplementation("org.testcontainers", "elasticsearch", "1.17.1")
225226
}
226227

227228

java-client/src/test/java/co/elastic/clients/documentation/api_conventions/ApiConventionsTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
import co.elastic.clients.elasticsearch.indices.CreateIndexResponse;
3434
import co.elastic.clients.transport.ElasticsearchTransport;
3535
import co.elastic.clients.util.ApiTypeHelper;
36-
import org.junit.Assert;
37-
import org.junit.Test;
36+
import org.junit.jupiter.api.Assertions;
37+
import org.junit.jupiter.api.Test;
3838
import org.slf4j.Logger;
3939
import org.slf4j.LoggerFactory;
4040

@@ -43,7 +43,7 @@
4343
import java.util.List;
4444
import java.util.Map;
4545

46-
public class ApiConventionsTest extends Assert {
46+
public class ApiConventionsTest extends Assertions {
4747

4848
private static class SomeApplicationData {}
4949

java-client/src/test/java/co/elastic/clients/documentation/api_conventions/LoadingJsonTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
import co.elastic.clients.elasticsearch.indices.CreateIndexResponse;
3232
import co.elastic.clients.elasticsearch.model.ModelTestCase;
3333
import co.elastic.clients.json.JsonData;
34-
import org.junit.Ignore;
35-
import org.junit.Test;
34+
import org.junit.jupiter.api.Disabled;
35+
import org.junit.jupiter.api.Test;
3636

3737
import java.io.File;
3838
import java.io.FileReader;
@@ -86,8 +86,8 @@ public void loadIndexDefinition() throws IOException {
8686
//end::load-index
8787
}
8888

89+
@Disabled
8990
@Test
90-
@Ignore
9191
public void ingestDocument() throws IOException {
9292

9393
File dataDir = null;

java-client/src/test/java/co/elastic/clients/documentation/getting_started/ConnectingTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
import co.elastic.clients.transport.rest_client.RestClientTransport;
2929
import org.apache.http.HttpHost;
3030
import org.elasticsearch.client.RestClient;
31-
import org.junit.Ignore;
32-
import org.junit.Test;
31+
import org.junit.jupiter.api.Disabled;
32+
import org.junit.jupiter.api.Test;
3333

3434
public class ConnectingTest {
3535

36-
@Ignore // we don't have a running ES
36+
@Disabled // we don't have a running ES
3737
@Test
3838
public void createClient() throws Exception {
3939
//tag::create-client

java-client/src/test/java/co/elastic/clients/documentation/getting_started/MigrateHlrcTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import co.elastic.clients.transport.rest_client.RestClientTransport;
2626
import org.apache.http.HttpHost;
2727
import org.elasticsearch.client.RestClient;
28-
import org.junit.Test;
28+
import org.junit.jupiter.api.Test;
2929

3030
public class MigrateHlrcTest {
3131

java-client/src/test/java/co/elastic/clients/documentation/usage/AggregationsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import co.elastic.clients.elasticsearch.core.search.TotalHitsRelation;
2929
import co.elastic.clients.elasticsearch.model.ModelTestCase;
3030
import co.elastic.clients.json.JsonData;
31-
import org.junit.Test;
31+
import org.junit.jupiter.api.Test;
3232
import org.slf4j.Logger;
3333
import org.slf4j.LoggerFactory;
3434

java-client/src/test/java/co/elastic/clients/documentation/usage/IndexingBulkTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import co.elastic.clients.json.JsonData;
2929
import co.elastic.clients.json.JsonpMapper;
3030
import jakarta.json.spi.JsonProvider;
31-
import org.junit.Test;
31+
import org.junit.jupiter.api.Test;
3232
import org.slf4j.Logger;
3333
import org.slf4j.LoggerFactory;
3434

java-client/src/test/java/co/elastic/clients/documentation/usage/IndexingTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import co.elastic.clients.elasticsearch.core.IndexResponse;
2828
import co.elastic.clients.elasticsearch.model.ModelTestCase;
2929
import co.elastic.clients.json.JsonData;
30-
import org.junit.Test;
30+
import org.junit.jupiter.api.Test;
3131
import org.slf4j.Logger;
3232
import org.slf4j.LoggerFactory;
3333

java-client/src/test/java/co/elastic/clients/documentation/usage/ReadingTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import co.elastic.clients.elasticsearch.core.GetResponse;
2525
import co.elastic.clients.elasticsearch.model.ModelTestCase;
2626
import com.fasterxml.jackson.databind.node.ObjectNode;
27-
import org.junit.Test;
27+
import org.junit.jupiter.api.Test;
2828
import org.slf4j.Logger;
2929
import org.slf4j.LoggerFactory;
3030

java-client/src/test/java/co/elastic/clients/documentation/usage/SearchingTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import co.elastic.clients.elasticsearch.core.search.TotalHits;
3030
import co.elastic.clients.elasticsearch.core.search.TotalHitsRelation;
3131
import co.elastic.clients.json.JsonData;
32-
import org.junit.Test;
32+
import org.junit.jupiter.api.Test;
3333
import org.slf4j.Logger;
3434
import org.slf4j.LoggerFactory;
3535

java-client/src/test/java/co/elastic/clients/elasticsearch/ElasticsearchTestServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static synchronized ElasticsearchTestServer global() {
5757
}
5858

5959
private synchronized void setup() {
60-
container = new ElasticsearchContainer("docker.elastic.co/elasticsearch/elasticsearch:7.16.2")
60+
container = new ElasticsearchContainer("docker.elastic.co/elasticsearch/elasticsearch:7.17.3")
6161
.withEnv("ES_JAVA_OPTS", "-Xms256m -Xmx256m")
6262
.withEnv("path.repo", "/tmp") // for snapshots
6363
.withStartupTimeout(Duration.ofSeconds(30))

java-client/src/test/java/co/elastic/clients/elasticsearch/end_to_end/RequestTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
import co.elastic.clients.elasticsearch.model.ModelTestCase;
4646
import co.elastic.clients.transport.endpoints.BooleanResponse;
4747
import co.elastic.clients.util.DateTime;
48-
import org.junit.Assert;
49-
import org.junit.BeforeClass;
50-
import org.junit.Test;
48+
import org.junit.jupiter.api.Assertions;
49+
import org.junit.jupiter.api.BeforeAll;
50+
import org.junit.jupiter.api.Test;
5151

5252
import java.io.IOException;
5353
import java.time.Instant;
@@ -58,11 +58,11 @@
5858
import java.util.concurrent.ExecutionException;
5959
import java.util.concurrent.TimeUnit;
6060

61-
public class RequestTest extends Assert {
61+
public class RequestTest extends Assertions {
6262

6363
static ElasticsearchClient client;
6464

65-
@BeforeClass
65+
@BeforeAll
6666
public static void setup() {
6767
client = ElasticsearchTestServer.global().client();
6868
}

java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/ClientTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import co.elastic.clients.elasticsearch.experiments.api.query2.TermsQuery;
2727
import co.elastic.clients.elasticsearch.experiments.base.Client;
2828
import co.elastic.clients.transport.Endpoint;
29-
import org.junit.Test;
29+
import org.junit.jupiter.api.Test;
3030

3131
import java.io.IOException;
3232
import java.util.Collections;

java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/ParsingTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
import jakarta.json.stream.JsonGenerator;
2727
import jakarta.json.stream.JsonParser;
2828
import jakarta.json.stream.JsonParsingException;
29-
import org.junit.Assert;
30-
import org.junit.Test;
29+
import org.junit.jupiter.api.Assertions;
30+
import org.junit.jupiter.api.Test;
3131

3232
import java.io.ByteArrayInputStream;
3333
import java.io.ByteArrayOutputStream;
3434
import java.nio.charset.StandardCharsets;
3535

36-
public class ParsingTests extends Assert {
36+
public class ParsingTests extends Assertions {
3737

3838
@Test
3939
public void testFoo() throws Exception {

java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/api/query2/QueryTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919

2020
package co.elastic.clients.elasticsearch.experiments.api.query2;
2121

22-
import org.junit.Assert;
23-
import org.junit.Test;
22+
import org.junit.jupiter.api.Assertions;
23+
import org.junit.jupiter.api.Test;
2424

2525
import java.util.Collection;
2626

27-
public class QueryTest extends Assert {
27+
public class QueryTest extends Assertions {
2828
@Test
2929
public void testQuery() {
3030
BoolQuery bq = new BoolQuery.Builder().build();

java-client/src/test/java/co/elastic/clients/elasticsearch/experiments/containers/SomeUnionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import jakarta.json.stream.JsonGenerator;
2727
import jakarta.json.stream.JsonParser;
2828
import jakarta.json.stream.JsonParsingException;
29-
import org.junit.Test;
29+
import org.junit.jupiter.api.Test;
3030

3131
import java.io.ByteArrayOutputStream;
3232
import java.io.StringReader;

0 commit comments

Comments
 (0)