diff --git a/test-apps/scripting/src/test/java/org/jberet/testapps/scripting/ScriptingIT.java b/test-apps/scripting/src/test/java/org/jberet/testapps/scripting/ScriptingIT.java index ccb0277fa..05cfae5a3 100644 --- a/test-apps/scripting/src/test/java/org/jberet/testapps/scripting/ScriptingIT.java +++ b/test-apps/scripting/src/test/java/org/jberet/testapps/scripting/ScriptingIT.java @@ -19,6 +19,7 @@ import org.jberet.testapps.common.AbstractIT; import org.junit.Assert; +import org.junit.Assume; import org.junit.BeforeClass; import org.junit.Test; @@ -62,11 +63,13 @@ public void batchletGroovySrc() throws Exception { @Test public void batchletRubySrc() throws Exception { + Assume.assumeTrue(getJavaVersionMajor() <= 11); test0("batchletRubySrc"); } @Test public void batchletRubyInline() throws Exception { + Assume.assumeTrue(getJavaVersionMajor() <= 11); test0("batchletRubyInline"); } @@ -119,6 +122,7 @@ public void chunkPython() throws Exception { @Test public void chunkRuby() throws Exception { + Assume.assumeTrue(getJavaVersionMajor() <= 11); test0("chunkRuby"); } @@ -135,4 +139,10 @@ void test0(final String testName) throws Exception { Assert.assertTrue(jobExecution.getExitStatus().equals(testName) || jobExecution.getExitStatus().equals(BatchStatus.COMPLETED.toString())); Assert.assertTrue(stepExecution0.getExitStatus().equals(testName) || stepExecution0.getExitStatus().equals(BatchStatus.COMPLETED.toString())); } + + int getJavaVersionMajor() { + final String versionVal = System.getProperty("java.version"); + final String[] split = versionVal.split("\\."); + return Integer.parseInt(split[0]); + } }