Skip to content

Commit

Permalink
JEXL: attempting blind fix for test on some envs
Browse files Browse the repository at this point in the history
  • Loading branch information
henrib committed Apr 20, 2021
1 parent 385f1ff commit 693961a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -583,22 +583,22 @@ public void testTimeout() throws Exception {

result = script.execute(ctxt, false);
Assert.assertEquals(42, result);
script = JEXL.createScript("@timeout(10) {sleep(1000); 42; } -42;");
script = JEXL.createScript("@timeout(100) {sleep(1000); 42; } -42;");
try {
result = script.execute(ctxt);
} catch (final Exception xany) {
Assert.fail(xany.toString());
}
Assert.assertEquals(-42, result);

script = JEXL.createScript("@timeout(10) {sleep(1000); return 42; } return -42;");
script = JEXL.createScript("@timeout(100) {sleep(1000); return 42; } return -42;");
try {
result = script.execute(ctxt);
} catch (final Exception xany) {
Assert.fail(xany.toString());
}
Assert.assertEquals(-42, result);
script = JEXL.createScript("@timeout(1000) {sleep(10); return 42; } return -42;");
script = JEXL.createScript("@timeout(1000) {sleep(100); return 42; } return -42;");
try {
result = script.execute(ctxt);
} catch (final Exception xany) {
Expand Down

0 comments on commit 693961a

Please sign in to comment.