Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0
-
None
Description
The following test case fails with
java.lang.AssertionError: Values should be different. Actual: 42 at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failEquals(Assert.java:185) at org.junit.Assert.assertNotEquals(Assert.java:161)
public static class TestContext extends MapContext implements JexlContext.NamespaceResolver { public int interrupt() throws InterruptedException { throw new InterruptedException(); } } @Test public void testInterrupt() throws Exception { JexlEngine jexl = new JexlBuilder().arithmetic(new JexlArithmetic(false)).strict(false).silent(true).create(); JexlScript e = jexl.createScript("interrupt(); return 42"); Callable<Object> c = e.callable(new TestContext()); Object t = c.call(); Assert.assertNotEquals(42, t); }
Expected behaviour is to cancel script execution