Skip to content

Commit 9bd0143

Browse files
swallezaltro3
andauthored
Actualize libs versions. Move tests to junit jupiter (#284) (#323)
Co-authored-by: altro3 <[email protected]>
1 parent e057f03 commit 9bd0143

Some content is hidden

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

41 files changed

+97
-95
lines changed

docs/getting-started/migrate-hlrc.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You can use the HLRC version `7.x` with the {java-client} version `8.x`:
2525
--------------------------------------------------
2626
dependencies {
2727
implementation 'co.elastic.clients:elasticsearch-java:{version}'
28-
implementation 'org.elasticsearch.client:elasticsearch-rest-high-level-client:7.17.3'
28+
implementation 'org.elasticsearch.client:elasticsearch-rest-high-level-client:7.17.4'
2929
// other dependencies <1>
3030
}
3131
--------------------------------------------------

java-client/build.gradle.kts

Lines changed: 13 additions & 11 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.4"
175+
val jacksonVersion = "2.13.3"
176176

177177
// Apache 2.0
178178
// https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-low.html
@@ -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.147")
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.2")
225+
testImplementation("org.testcontainers", "elasticsearch", "1.17.2")
225226
}
226227

227228

@@ -238,6 +239,7 @@ class SpdxReporter(val dest: File) : ReportRenderer {
238239
"BSD Zero Clause License" to "0BSD",
239240
"Eclipse Public License 2.0" to "EPL-2.0",
240241
"Eclipse Public License v. 2.0" to "EPL-2.0",
242+
"Eclipse Public License - v 2.0" to "EPL-2.0",
241243
"GNU General Public License, version 2 with the GNU Classpath Exception" to "GPL-2.0 WITH Classpath-exception-2.0",
242244
"COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0" to "CDDL-1.0"
243245
)

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

0 commit comments

Comments
 (0)