Clarify JDK requirement in the developer guide (#1153)
* Explicitly point out the JDK 8 requirement is for runtime, but not for compiling. * Clarify the JAVAx_HOME env variables are for the "backwards compatibility test". * Add explanation on how the backwards compatibility tests get the OpenSearch distributions for a specific version. Signed-off-by: Tianli Feng <ftianli@amazon.com>
This commit is contained in:
parent
3a7f0762ac
commit
652cdbd5af
|
@ -49,9 +49,9 @@ Fork [opensearch-project/OpenSearch](https://github.com/opensearch-project/OpenS
|
||||||
|
|
||||||
OpenSearch builds using Java 11 at a minimum. This means you must have a JDK 11 installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK 11 installation, e.g. `JAVA_HOME=/usr/lib/jvm/jdk-11`.
|
OpenSearch builds using Java 11 at a minimum. This means you must have a JDK 11 installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK 11 installation, e.g. `JAVA_HOME=/usr/lib/jvm/jdk-11`.
|
||||||
|
|
||||||
By default, tests use the same runtime as `JAVA_HOME`. However, since OpenSearch supports JDK 8, the build supports compiling with JDK 11 and testing on a different version of JDK runtime. To do this, set `RUNTIME_JAVA_HOME` pointing to the Java home of another JDK installation, e.g. `RUNTIME_JAVA_HOME=/usr/lib/jvm/jdk-8`.
|
By default, tests use the same runtime as `JAVA_HOME`. However, since OpenSearch also supports JDK 8 as the runtime, the build supports compiling with JDK 11 and testing on a different version of JDK runtime. To do this, set `RUNTIME_JAVA_HOME` pointing to the Java home of another JDK installation, e.g. `RUNTIME_JAVA_HOME=/usr/lib/jvm/jdk-8`.
|
||||||
|
|
||||||
To run the full suite of tests you will also need `JAVA8_HOME`, `JAVA9_HOME`, `JAVA10_HOME`, `JAVA11_HOME`, and `JAVA12_HOME`.
|
To run the full suite of tests you will also need `JAVA8_HOME`, `JAVA11_HOME`, and `JAVA14_HOME`. They are required by the [backwards compatibility test](./TESTING.md#testing-backwards-compatibility).
|
||||||
|
|
||||||
#### Docker
|
#### Docker
|
||||||
|
|
||||||
|
|
10
TESTING.md
10
TESTING.md
|
@ -363,7 +363,13 @@ These test tasks can use the `--tests`, `--info`, and `--debug` parameters just
|
||||||
|
|
||||||
# Testing backwards compatibility
|
# Testing backwards compatibility
|
||||||
|
|
||||||
Backwards compatibility tests exist to test upgrading from each supported version to the current version. To run them all use:
|
Backwards compatibility tests exist to test upgrading from each supported version to the current version.
|
||||||
|
|
||||||
|
The test can be run for any versions which the current version will be compatible with. Tests are run for released versions download the distributions from the artifact repository, see [DistributionDownloadPlugin](./buildSrc/src/main/java/org/opensearch/gradle/DistributionDownloadPlugin.java) for the repository location. Tests are run for versions that are not yet released automatically check out the branch and build from source to get the distributions, see [BwcVersions](./buildSrc/src/main/java/org/opensearch/gradle/BwcVersions.java) and [distribution/bwc/build.gradle](./distribution/bwc/build.gradle) for more information.
|
||||||
|
|
||||||
|
The minimum JDK versions for runtime and compiling need to be installed, and environment variables `JAVAx_HOME`, such as `JAVA8_HOME`, pointing to the JDK installations are required to run the tests against unreleased versions, since the distributions are created by building from source. The required JDK versions for each branch are located at [.ci/java-versions.properties](.ci/java-versions.properties), see [BwcSetupExtension](./buildSrc/src/main/java/org/opensearch/gradle/internal/BwcSetupExtension.java) for more information.
|
||||||
|
|
||||||
|
To run all the backwards compatibility tests use:
|
||||||
|
|
||||||
./gradlew bwcTest
|
./gradlew bwcTest
|
||||||
|
|
||||||
|
@ -377,8 +383,6 @@ Use -Dtest.class and -Dtests.method to run a specific bwcTest test. For example
|
||||||
-Dtests.class=org.opensearch.upgrades.RecoveryIT \
|
-Dtests.class=org.opensearch.upgrades.RecoveryIT \
|
||||||
-Dtests.method=testHistoryUUIDIsGenerated
|
-Dtests.method=testHistoryUUIDIsGenerated
|
||||||
|
|
||||||
Tests are run for versions that are not yet released but with which the current version will be compatible with. These are automatically checked out and built from source. See [BwcVersions](./buildSrc/src/main/java/org/opensearch/gradle/BwcVersions.java) and [distribution/bwc/build.gradle](./distribution/bwc/build.gradle) for more information.
|
|
||||||
|
|
||||||
When running `./gradlew check`, minimal bwc checks are also run against compatible versions that are not yet released.
|
When running `./gradlew check`, minimal bwc checks are also run against compatible versions that are not yet released.
|
||||||
|
|
||||||
## BWC Testing against a specific remote/branch
|
## BWC Testing against a specific remote/branch
|
||||||
|
|
Loading…
Reference in New Issue