From ee282ab97fbb49301daefa331cd988221a41d67b Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Tue, 2 Feb 2021 13:49:12 +0100 Subject: [PATCH] Fix assumption in ScriptItemProcessorTests.testItemBinding This test fails on Java 15 because the Javascript engine has been removed in Java 15 (JEP 372). This commit updates the test to assume that the JavaScript engine is provided to the JVM through a factory (similar to other tests). --- .../batch/item/support/ScriptItemProcessorTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/support/ScriptItemProcessorTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/support/ScriptItemProcessorTests.java index e294c0085..f8d26eb7c 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/support/ScriptItemProcessorTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/support/ScriptItemProcessorTests.java @@ -154,6 +154,8 @@ public class ScriptItemProcessorTests { @Test public void testItemBinding() throws Exception { + assumeTrue(languageExists("javascript")); + ScriptItemProcessor scriptItemProcessor = new ScriptItemProcessor<>(); scriptItemProcessor.setScriptSource("foo.contains('World');", "javascript"); scriptItemProcessor.setItemBindingVariableName("foo");