Skip to content

Commit caa668f

Browse files
committed
java 11 jdk test
1 parent ff4cb07 commit caa668f

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.kokoro/build.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,21 @@ case ${JOB_TYPE} in
9494
install_modules "${BUILD_SUBDIR}"
9595
echo "Running in subdir: ${BUILD_SUBDIR}"
9696
pushd "${BUILD_SUBDIR}"
97+
98+
if [[ "${BUILD_SUBDIR}" == "java-datastore" ]]; then
99+
# Kokoro integration tests use both JDK 11 and JDK 8. Integration
100+
# tests require JDK 11 export as JAVA env variable to run cloud datastore
101+
# emulator (https://cloud.google.com/sdk/docs/release-notes#39300_2022-07-12).
102+
# For Java 8 environment, we will still run the tests using Java 8 with
103+
# SUREFIRE_JVM_OPT for Maven surefire plugin:
104+
# https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
105+
if [[ -n "${JAVA11_HOME}" && -n "${JAVA8_HOME}" ]]
106+
then
107+
export JAVA=${JAVA11_HOME}/bin/java
108+
export SUREFIRE_JVM_OPT=-Djvm=${JAVA8_HOME}/bin/java
109+
fi
110+
fi
111+
97112
echo "SUREFIRE_JVM_OPT: ${SUREFIRE_JVM_OPT}"
98113
echo "INTEGRATION_TEST_ARGS: ${INTEGRATION_TEST_ARGS}"
99114
mvn verify -Penable-integration-tests \

0 commit comments

Comments
 (0)