You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2020/05/06 05:48:13 UTC

[ant] branch master updated: ignore test that requires Nashorn on Java 15+ for now

This is an automated email from the ASF dual-hosted git repository.

bodewig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git


The following commit(s) were added to refs/heads/master by this push:
     new dffd57c  ignore test that requires Nashorn on Java 15+ for now
dffd57c is described below

commit dffd57ca23bcb6e8f40d14a9d1f49d143b2dc8d3
Author: Stefan Bodewig <bo...@apache.org>
AuthorDate: Wed May 6 07:47:30 2020 +0200

    ignore test that requires Nashorn on Java 15+ for now
---
 .../org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java   | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java
index 667db43..814b178 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java
@@ -21,6 +21,7 @@ import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.BuildFileRule;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.util.JavaEnvUtils;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
@@ -29,6 +30,7 @@ import org.junit.rules.ExpectedException;
 import java.io.File;
 
 import static org.hamcrest.Matchers.containsString;
+import static org.junit.Assume.assumeFalse;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
@@ -155,6 +157,7 @@ public class ScriptDefTest {
 
     @Test
     public void testUseCompiled() {
+        assumeFalse("Current system is Java 15 or newer", JavaEnvUtils.isAtLeastJavaVersion("15"));
 
         final long duration;
         {