Skip to content

Commit

Permalink
Adds build support for JDK 8 (#297)
Browse files Browse the repository at this point in the history
* Adds java matrix to test and build workflow

Signed-off-by: Robert Downs <downsrob@amazon.com>

* Fixes JDK 8 error

Signed-off-by: Robert Downs <downsrob@amazon.com>

* Removes java 17 from matrix

Signed-off-by: Robert Downs <downsrob@amazon.com>
(cherry picked from commit edd12c4)
Signed-off-by: Robert Downs <downsrob@amazon.com>
  • Loading branch information
downsrob committed Mar 10, 2022
1 parent a05a5b9 commit 57ae36a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,28 @@ jobs:
fail-fast: false
# This starts three jobs, setting these environment variables uniquely for the different jobs
matrix:
java: [8, 11, 14]
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
- os: windows-latest
os_build_args: -x integTest -x jacocoTestReport
working_directory: X:\
os_java_options: -Xmx4096M
- os: macos-latest
os_build_args: -x integTest -x jacocoTestReport
# Only testing the LTS java version on mac and windows
exclude:
- os: windows-latest
java: [8, 14]
- os: macos-latest
java: [8, 14]
runs-on: ${{ matrix.os }}
steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 11
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: 11
java-version: ${{ matrix.java }}
# build index management
- name: Checkout Branch
uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class WaitForForceMergeStep(private val action: ForceMergeAction) : Step(name, f
// Get ActionTimeout if given, otherwise use default timeout of 12 hours
val timeoutInSeconds: Long = action.configTimeout?.timeout?.seconds ?: FORCE_MERGE_TIMEOUT_IN_SECONDS

if (timeWaitingForForceMerge.toSeconds() > timeoutInSeconds) {
if (timeWaitingForForceMerge.seconds > timeoutInSeconds) {
logger.error(
"Force merge on [$indexName] timed out with" +
" [$shardsStillMergingSegments] shards containing unmerged segments"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import org.opensearch.client.RequestOptions
import org.opensearch.client.Response
import org.opensearch.client.RestClient
import org.opensearch.common.Strings
import org.opensearch.common.io.PathUtils
import org.opensearch.common.settings.Settings
import org.opensearch.indexmanagement.indexstatemanagement.util.INDEX_HIDDEN
import org.opensearch.rest.RestStatus
import java.nio.file.Files
import java.nio.file.Path
import javax.management.MBeanServerInvocationHandler
import javax.management.ObjectName
import javax.management.remote.JMXConnectorFactory
Expand Down Expand Up @@ -171,7 +171,7 @@ abstract class IndexManagementRestTestCase : ODFERestTestCase() {
false
)
proxy.getExecutionData(false)?.let {
val path = Path.of("$jacocoBuildPath/integTest.exec")
val path = PathUtils.get("$jacocoBuildPath/integTest.exec")
Files.write(path, it)
}
}
Expand Down

0 comments on commit 57ae36a

Please sign in to comment.