diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 982d3d957a..14fa9a538f 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -7,7 +7,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - java: [ 11, 17, 21 ] + java: [ 8, 11, 17, 21 ] os: [ubuntu-latest, windows-latest, macOS-latest] steps: - name: Checkout Java Client @@ -21,4 +21,17 @@ jobs: cache: 'gradle' - name: Run Unit Test + if: ${{ matrix.java != 8 }} run: ./gradlew clean unitTest + + - name: Set up JDK 11 + uses: actions/setup-java@v3 + if: ${{ matrix.java == 8 }} + with: + java-version: 11 + distribution: 'temurin' + cache: 'gradle' + + - name: Run Unit Test + if: ${{ matrix.java == 8 }} + run: ./gradlew clean unitTest -D"runtime.java=8" diff --git a/CHANGELOG.md b/CHANGELOG.md index 923b9476c4..a917e03acc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -84,6 +84,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Dependencies ### Changed +- Restore support for Java 8 ([#767](https://github.com/opensearch-project/opensearch-java/pull/767)) +- Add an integration test that runs on JDK-8 ([#795](https://github.com/opensearch-project/opensearch-java/pull/795)) ### Deprecated diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index 10bc8b9767..c1b6fca51d 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -19,7 +19,7 @@ The below matrix shows the compatibility of the [`opensearch-java-client`](https | Client Version | JDK | |----------------|--------------------| | 1.0.0 | 8 | -| 2.x.0 | 11 / 17 / 21 | +| 2.x.0 | 8 / 11 / 17 / 21 | ## Upgrading diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 39957669da..7c3e7e9457 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -32,6 +32,7 @@ import com.github.jk1.license.ProjectData import com.github.jk1.license.render.ReportRenderer +import org.gradle.api.tasks.testing.Test import java.io.FileWriter buildscript { @@ -60,9 +61,15 @@ configurations { } } +val runtimeJavaVersion = (System.getProperty("runtime.java")?.toInt())?.let(JavaVersion::toVersion) ?: JavaVersion.current() +logger.quiet("=======================================") +logger.quiet(" Runtime JDK Version : " + runtimeJavaVersion) +logger.quiet(" Gradle JDK Version : " + JavaVersion.current()) +logger.quiet("=======================================") + java { - targetCompatibility = JavaVersion.VERSION_11 - sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_1_8 withJavadocJar() withSourcesJar() @@ -70,6 +77,11 @@ java { registerFeature("awsSdk2Support") { usingSourceSet(sourceSets.get("main")) } + + toolchain { + languageVersion = JavaLanguageVersion.of(runtimeJavaVersion.majorVersion) + vendor = JvmVendorSpec.ADOPTIUM + } } tasks.withType { @@ -146,15 +158,19 @@ val integrationTest = task("integrationTest") { System.getProperty("tests.awsSdk2support.domainRegion", "us-east-1")) } +val opensearchVersion = "2.12.0" + dependencies { - val opensearchVersion = "2.7.0" - val jacksonVersion = "2.15.2" - val jacksonDatabindVersion = "2.15.2" + val jacksonVersion = "2.16.1" + val jacksonDatabindVersion = "2.16.1" // Apache 2.0 implementation("org.opensearch.client", "opensearch-rest-client", opensearchVersion) - testImplementation("org.opensearch.test", "framework", opensearchVersion) + testImplementation("org.hamcrest:hamcrest:2.2") + testImplementation("com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.8.1") { + exclude(group = "junit") + } // Apache 2.0 // https://search.maven.org/artifact/com.google.code.findbugs/jsr305 @@ -327,3 +343,37 @@ publishing { } } } + +if (runtimeJavaVersion >= JavaVersion.VERSION_11) { + val java11: SourceSet = sourceSets.create("java11") { + java { + compileClasspath += sourceSets.main.get().output + sourceSets.test.get().output + runtimeClasspath += sourceSets.main.get().output + sourceSets.test.get().output + srcDir("src/test/java11") + } + } + + configurations[java11.implementationConfigurationName].extendsFrom(configurations.testImplementation.get()) + configurations[java11.runtimeOnlyConfigurationName].extendsFrom(configurations.testRuntimeOnly.get()) + + dependencies { + testImplementation("org.opensearch.test", "framework", opensearchVersion) { + exclude(group = "org.hamcrest") + } + } + + tasks.named("compileJava11Java") { + targetCompatibility = JavaVersion.VERSION_11.toString() + sourceCompatibility = JavaVersion.VERSION_11.toString() + } + + tasks.named("compileTestJava") { + targetCompatibility = JavaVersion.VERSION_11.toString() + sourceCompatibility = JavaVersion.VERSION_11.toString() + } + + tasks.test { + testClassesDirs += java11.output.classesDirs + classpath = sourceSets["java11"].runtimeClasspath + } +} diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/GeoDistanceQueryTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/GeoDistanceQueryTest.java index edaa9edf56..289f5c75a8 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/GeoDistanceQueryTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/GeoDistanceQueryTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch._types.query_dsl; -import java.util.List; +import java.util.Collections; import org.junit.Test; import org.opensearch.client.opensearch._types.GeoLocation; import org.opensearch.client.opensearch.model.ModelTestCase; @@ -9,7 +9,7 @@ public class GeoDistanceQueryTest extends ModelTestCase { @Test public void toBuilder() { GeoDistanceQuery origin = new GeoDistanceQuery.Builder().field("field") - .location(new GeoLocation.Builder().coords(List.of(1.0)).build()) + .location(new GeoLocation.Builder().coords(Collections.singletonList(1.0)).build()) .build(); GeoDistanceQuery copied = origin.toBuilder().build(); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQueryTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQueryTest.java index 3c779919de..074b7ead70 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQueryTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/PinnedQueryTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch._types.query_dsl; -import java.util.List; +import java.util.Collections; import org.junit.Test; import org.opensearch.client.opensearch._types.FieldValue; import org.opensearch.client.opensearch.model.ModelTestCase; @@ -8,7 +8,7 @@ public class PinnedQueryTest extends ModelTestCase { @Test public void toBuilder() { - PinnedQuery origin = new PinnedQuery.Builder().organic(buildDummyQuery()).ids(List.of("1")).build(); + PinnedQuery origin = new PinnedQuery.Builder().organic(buildDummyQuery()).ids(Collections.singletonList("1")).build(); PinnedQuery copied = origin.toBuilder().build(); assertEquals(toJson(copied), toJson(origin)); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanContainingQueryTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanContainingQueryTest.java index fabb167771..cbcfa17886 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanContainingQueryTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanContainingQueryTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch._types.query_dsl; -import java.util.List; +import java.util.Collections; import org.junit.Test; import org.opensearch.client.opensearch.model.ModelTestCase; @@ -8,8 +8,8 @@ public class SpanContainingQueryTest extends ModelTestCase { @Test public void toBuilder() { SpanContainingQuery origin = new SpanContainingQuery.Builder().big( - new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(List.of()).build()).build() - ).little(new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(List.of()).build()).build()).build(); + new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(Collections.emptyList()).build()).build() + ).little(new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(Collections.emptyList()).build()).build()).build(); SpanContainingQuery copied = origin.toBuilder().build(); assertEquals(toJson(copied), toJson(origin)); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFieldMaskingQueryTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFieldMaskingQueryTest.java index af176824f7..d420c9242c 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFieldMaskingQueryTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFieldMaskingQueryTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch._types.query_dsl; -import java.util.List; +import java.util.Collections; import org.junit.Test; import org.opensearch.client.opensearch.model.ModelTestCase; @@ -8,7 +8,7 @@ public class SpanFieldMaskingQueryTest extends ModelTestCase { @Test public void toBuilder() { SpanFieldMaskingQuery origin = new SpanFieldMaskingQuery.Builder().field("field") - .query(new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(List.of()).build()).build()) + .query(new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(Collections.emptyList()).build()).build()) .build(); SpanFieldMaskingQuery copied = origin.toBuilder().build(); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFirstQueryTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFirstQueryTest.java index 3b0fbac20c..f9fc4afe7d 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFirstQueryTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanFirstQueryTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch._types.query_dsl; -import java.util.List; +import java.util.Collections; import org.junit.Test; import org.opensearch.client.opensearch.model.ModelTestCase; @@ -8,7 +8,7 @@ public class SpanFirstQueryTest extends ModelTestCase { @Test public void toBuilder() { SpanFirstQuery origin = new SpanFirstQuery.Builder().end(1) - .match(new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(List.of()).build()).build()) + .match(new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(Collections.emptyList()).build()).build()) .build(); SpanFirstQuery copied = origin.toBuilder().build(); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNearQueryTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNearQueryTest.java index ffff730cf1..f48ded1f69 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNearQueryTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNearQueryTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch._types.query_dsl; -import java.util.List; +import java.util.Collections; import org.junit.Test; import org.opensearch.client.opensearch.model.ModelTestCase; @@ -8,7 +8,9 @@ public class SpanNearQueryTest extends ModelTestCase { @Test public void toBuilder() { SpanNearQuery origin = new SpanNearQuery.Builder().clauses( - List.of(new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(List.of()).build()).build()) + Collections.singletonList( + new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(Collections.emptyList()).build()).build() + ) ).build(); SpanNearQuery copied = origin.toBuilder().build(); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNotQueryTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNotQueryTest.java index 2a2757d1a6..a5d9d9b14a 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNotQueryTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanNotQueryTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch._types.query_dsl; -import java.util.List; +import java.util.Collections; import org.junit.Test; import org.opensearch.client.opensearch.model.ModelTestCase; @@ -8,8 +8,8 @@ public class SpanNotQueryTest extends ModelTestCase { @Test public void toBuilder() { SpanNotQuery origin = new SpanNotQuery.Builder().include( - new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(List.of()).build()).build() - ).exclude(new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(List.of()).build()).build()).build(); + new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(Collections.emptyList()).build()).build() + ).exclude(new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(Collections.emptyList()).build()).build()).build(); SpanNotQuery copied = origin.toBuilder().build(); assertEquals(toJson(copied), toJson(origin)); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanOrQueryTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanOrQueryTest.java index 407c0717c9..a0c3a83eee 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanOrQueryTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanOrQueryTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch._types.query_dsl; -import java.util.List; +import java.util.Collections; import org.junit.Test; import org.opensearch.client.opensearch.model.ModelTestCase; @@ -8,7 +8,9 @@ public class SpanOrQueryTest extends ModelTestCase { @Test public void toBuilder() { SpanOrQuery origin = new SpanOrQuery.Builder().clauses( - List.of(new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(List.of()).build()).build()) + Collections.singletonList( + new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(Collections.emptyList()).build()).build() + ) ).build(); SpanOrQuery copied = origin.toBuilder().build(); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQueryTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQueryTest.java index 5d941045ee..942e67d177 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQueryTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanQueryTest.java @@ -1,13 +1,13 @@ package org.opensearch.client.opensearch._types.query_dsl; -import java.util.List; +import java.util.Collections; import org.junit.Test; import org.opensearch.client.opensearch.model.ModelTestCase; public class SpanQueryTest extends ModelTestCase { @Test public void toBuilder() { - SpanQuery origin = new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(List.of()).build()).build(); + SpanQuery origin = new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(Collections.emptyList()).build()).build(); SpanQuery copied = origin.toBuilder().build(); assertEquals(toJson(copied), toJson(origin)); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanWithinQueryTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanWithinQueryTest.java index ce71e79c33..42208a9372 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanWithinQueryTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/SpanWithinQueryTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch._types.query_dsl; -import java.util.List; +import java.util.Collections; import org.junit.Test; import org.opensearch.client.opensearch.model.ModelTestCase; @@ -8,8 +8,8 @@ public class SpanWithinQueryTest extends ModelTestCase { @Test public void toBuilder() { SpanWithinQuery origin = new SpanWithinQuery.Builder().big( - new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(List.of()).build()).build() - ).little(new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(List.of()).build()).build()).build(); + new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(Collections.emptyList()).build()).build() + ).little(new SpanQuery.Builder().spanOr(new SpanOrQuery.Builder().clauses(Collections.emptyList()).build()).build()).build(); SpanWithinQuery copied = origin.toBuilder().build(); assertEquals(toJson(copied), toJson(origin)); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryFieldTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryFieldTest.java index 41fb249d51..5af873b206 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryFieldTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryFieldTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch._types.query_dsl; -import java.util.List; +import java.util.Collections; import org.junit.Test; import org.opensearch.client.opensearch._types.FieldValue; import org.opensearch.client.opensearch.model.ModelTestCase; @@ -8,7 +8,7 @@ public class TermsQueryFieldTest extends ModelTestCase { @Test public void toBuilder() { - TermsQueryField origin = new TermsQueryField.Builder().value(List.of(FieldValue.of("1"))).build(); + TermsQueryField origin = new TermsQueryField.Builder().value(Collections.singletonList(FieldValue.of("1"))).build(); TermsQueryField copied = origin.toBuilder().build(); assertEquals(toJson(copied), toJson(origin)); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryTest.java index a8bea25397..bf9ed792ec 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/query_dsl/TermsQueryTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch._types.query_dsl; -import java.util.List; +import java.util.Collections; import org.junit.Test; import org.opensearch.client.opensearch._types.FieldValue; import org.opensearch.client.opensearch.model.ModelTestCase; @@ -9,7 +9,7 @@ public class TermsQueryTest extends ModelTestCase { @Test public void toBuilder() { TermsQuery origin = new TermsQuery.Builder().field("field") - .terms(new TermsQueryField.Builder().value(List.of(FieldValue.of("1"))).build()) + .terms(new TermsQueryField.Builder().value(Collections.singletonList(FieldValue.of("1"))).build()) .build(); TermsQuery copied = origin.toBuilder().build(); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/core/BulkRequestTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/core/BulkRequestTest.java index c173f1482d..bdb5e01aa2 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/core/BulkRequestTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/core/BulkRequestTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch.core; -import java.util.List; +import java.util.Collections; import org.junit.Assert; import org.junit.Test; import org.opensearch.client.opensearch.core.bulk.BulkOperation; @@ -11,7 +11,9 @@ public class BulkRequestTest extends Assert { @Test public void toBuilder() { BulkRequest origin = new BulkRequest.Builder().index("index") - .operations(List.of(new BulkOperation.Builder().delete(new DeleteOperation.Builder().id("id").build()).build())) + .operations( + Collections.singletonList(new BulkOperation.Builder().delete(new DeleteOperation.Builder().id("id").build()).build()) + ) .build(); BulkRequest copied = origin.toBuilder().build(); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/core/ClearScrollRequestTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/core/ClearScrollRequestTest.java index cc80c857d7..fea512e074 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/core/ClearScrollRequestTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/core/ClearScrollRequestTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch.core; -import java.util.List; +import java.util.Collections; import org.junit.Assert; import org.junit.Test; @@ -8,7 +8,7 @@ public class ClearScrollRequestTest extends Assert { @Test public void toBuilder() { - ClearScrollRequest origin = new ClearScrollRequest.Builder().scrollId(List.of("1")).build(); + ClearScrollRequest origin = new ClearScrollRequest.Builder().scrollId(Collections.singletonList("1")).build(); ClearScrollRequest copied = origin.toBuilder().build(); assertEquals(copied.scrollId(), origin.scrollId()); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/core/MsearchRequestTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/core/MsearchRequestTest.java index 166a2e0e6c..da470f0d31 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/core/MsearchRequestTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/core/MsearchRequestTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch.core; -import java.util.List; +import java.util.Collections; import org.junit.Assert; import org.junit.Test; @@ -8,7 +8,7 @@ public class MsearchRequestTest extends Assert { @Test public void toBuilder() { - MsearchRequest origin = new MsearchRequest.Builder().index("index").searches(List.of()).build(); + MsearchRequest origin = new MsearchRequest.Builder().index("index").searches(Collections.emptyList()).build(); MsearchRequest copied = origin.toBuilder().build(); assertEquals(copied.index(), origin.index()); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/core/MsearchTemplateRequestTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/core/MsearchTemplateRequestTest.java index c741332568..c2a41d7d1c 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/core/MsearchTemplateRequestTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/core/MsearchTemplateRequestTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch.core; -import java.util.List; +import java.util.Collections; import org.junit.Assert; import org.junit.Test; @@ -8,7 +8,9 @@ public class MsearchTemplateRequestTest extends Assert { @Test public void toBuilder() { - MsearchTemplateRequest origin = new MsearchTemplateRequest.Builder().index("index").searchTemplates(List.of()).build(); + MsearchTemplateRequest origin = new MsearchTemplateRequest.Builder().index("index") + .searchTemplates(Collections.emptyList()) + .build(); MsearchTemplateRequest copied = origin.toBuilder().build(); assertEquals(copied.index(), origin.index()); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/core/PutTemplateRequestTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/core/PutTemplateRequestTest.java index 449b41e496..b609094414 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/core/PutTemplateRequestTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/core/PutTemplateRequestTest.java @@ -2,8 +2,10 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import jakarta.json.stream.JsonParser; import java.io.StringReader; -import java.util.List; +import java.util.Collections; +import java.util.HashMap; import java.util.Map; import org.junit.Assert; import org.junit.Test; @@ -16,15 +18,19 @@ public class PutTemplateRequestTest extends Assert { @Test public void deserialize_validFieldsIncluded_RequestIsBuilt() throws JsonProcessingException { final JsonpMapper mapper = new JsonbJsonpMapper(); - final Map indexTemplateMap = Map.of("name", "test", "index_patterns", "*", "create", true, "order", 1); + final Map indexTemplateMap = new HashMap<>(); + indexTemplateMap.put("name", "test"); + indexTemplateMap.put("index_patterns", "*"); + indexTemplateMap.put("create", true); + indexTemplateMap.put("order", 1); final String indexTemplate = new ObjectMapper().writeValueAsString(indexTemplateMap); - final var parser = mapper.jsonProvider().createParser(new StringReader(indexTemplate)); + final JsonParser parser = mapper.jsonProvider().createParser(new StringReader(indexTemplate)); final PutTemplateRequest putTemplateRequest = PutTemplateRequest._DESERIALIZER.deserialize(parser, mapper); assertEquals(putTemplateRequest.name(), "test"); - assertEquals(putTemplateRequest.indexPatterns(), List.of("*")); + assertEquals(putTemplateRequest.indexPatterns(), Collections.singletonList("*")); assertEquals((int) putTemplateRequest.order(), 1); assertEquals(putTemplateRequest.create(), true); } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/core/RankEvalRequestTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/core/RankEvalRequestTest.java index babf2a7aec..83e8f27057 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/core/RankEvalRequestTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/core/RankEvalRequestTest.java @@ -1,6 +1,6 @@ package org.opensearch.client.opensearch.core; -import java.util.List; +import java.util.Collections; import org.junit.Assert; import org.junit.Test; @@ -8,7 +8,7 @@ public class RankEvalRequestTest extends Assert { @Test public void toBuilder() { - RankEvalRequest origin = new RankEvalRequest.Builder().index("index").requests(List.of()).build(); + RankEvalRequest origin = new RankEvalRequest.Builder().index("index").requests(Collections.emptyList()).build(); RankEvalRequest copied = origin.toBuilder().build(); assertEquals(copied.index(), origin.index()); diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/core/search/InnerHitsTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/core/search/InnerHitsTest.java index 1269ebb0df..b9b4cdfa71 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/core/search/InnerHitsTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/core/search/InnerHitsTest.java @@ -9,7 +9,7 @@ import jakarta.json.stream.JsonParser; import java.io.StringReader; import java.io.StringWriter; -import java.util.List; +import java.util.Arrays; import org.junit.Test; import org.opensearch.client.json.JsonpMapper; import org.opensearch.client.json.JsonpSerializable; @@ -26,7 +26,7 @@ public class InnerHitsTest { */ @Test public void testInnerHitStoredFields() { - InnerHits hits = InnerHits.of((it) -> it.storedFields(List.of("field1", "field2"))); + InnerHits hits = InnerHits.of((it) -> it.storedFields(Arrays.asList("field1", "field2"))); assertTrue(toJson(hits).contains("stored_fields")); } diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractAggregationRequestIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractCatClientIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractClusterClientIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractClusterClientIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractClusterClientIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractClusterClientIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCrudIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractCrudIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractCrudIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractCrudIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractHighlightIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractHighlightIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractHighlightIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractHighlightIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractIndicesClientIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractKnnIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractKnnIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractKnnIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractKnnIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractMultiSearchRequestIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractMultiSearchRequestIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractMultiSearchRequestIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractMultiSearchRequestIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractNodesIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractNodesIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractNodesIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractNodesIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractPingAndInfoIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractPingAndInfoIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractPingAndInfoIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractPingAndInfoIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractRequestIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchRequestIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractSearchRequestIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchRequestIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractSearchRequestIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/AbstractSearchTemplateRequestIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/OpenSearchJavaClientTestCase.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchTransportSupport.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/OpenSearchTransportSupport.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/OpenSearchTransportSupport.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/OpenSearchTransportSupport.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/AggregationRequestIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/AggregationRequestIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/AggregationRequestIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/AggregationRequestIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CatIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/CatIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CatIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/CatIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/ClusterClientIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/ClusterClientIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/ClusterClientIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/ClusterClientIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CrudIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/CrudIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/CrudIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/CrudIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HighlightIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/HighlightIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HighlightIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/HighlightIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HttpClient5TransportSupport.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/HttpClient5TransportSupport.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/HttpClient5TransportSupport.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/HttpClient5TransportSupport.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/IndicesClientIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/IndicesClientIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/IndicesClientIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/IndicesClientIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/KnnIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/KnnIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/KnnIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/KnnIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/MultiSearchRequestIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/MultiSearchRequestIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/MultiSearchRequestIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/MultiSearchRequestIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/NodesIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/NodesIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/NodesIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/NodesIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/PingAndInfoIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/PingAndInfoIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/PingAndInfoIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/PingAndInfoIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/RequestIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/RequestIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/RequestIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/RequestIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/SearchRequestIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/SearchRequestIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/SearchRequestIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/SearchRequestIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/SearchTemplateRequestIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/SearchTemplateRequestIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/httpclient5/SearchTemplateRequestIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/httpclient5/SearchTemplateRequestIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/AggregationRequestIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CatIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/CatIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CatIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/CatIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/ClusterClientIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/ClusterClientIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/ClusterClientIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/ClusterClientIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CrudIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/CrudIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/CrudIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/CrudIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/HighlightIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/HighlightIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/HighlightIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/HighlightIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/IndicesClientIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/IndicesClientIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/IndicesClientIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/IndicesClientIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/KnnIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/KnnIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/KnnIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/KnnIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/MultiSearchRequestIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/MultiSearchRequestIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/MultiSearchRequestIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/MultiSearchRequestIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/NodesIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/NodesIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/NodesIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/NodesIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/PingAndInfoIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/PingAndInfoIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/PingAndInfoIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/PingAndInfoIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/RequestIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/SearchRequestIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/SearchRequestIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/SearchRequestIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/SearchRequestIT.java diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/SearchTemplateRequestIT.java b/java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/SearchTemplateRequestIT.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/opensearch/integTest/restclient/SearchTemplateRequestIT.java rename to java-client/src/test/java11/org/opensearch/client/opensearch/integTest/restclient/SearchTemplateRequestIT.java diff --git a/java-client/src/test/java/org/opensearch/client/transport/RequestOptionsTest.java b/java-client/src/test/java11/org/opensearch/client/transport/RequestOptionsTest.java similarity index 100% rename from java-client/src/test/java/org/opensearch/client/transport/RequestOptionsTest.java rename to java-client/src/test/java11/org/opensearch/client/transport/RequestOptionsTest.java diff --git a/settings.gradle.kts b/settings.gradle.kts index 6d462291d4..9c04316123 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -30,6 +30,10 @@ * GitHub history for details. */ +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version("0.7.0") +} + rootProject.name = "opensearch-java" include("java-client") -include("samples") \ No newline at end of file +include("samples")