diff options
author | liamfallon <liam.fallon@est.tech> | 2020-03-05 10:50:48 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2020-03-09 18:30:13 +0000 |
commit | 6bda5d7e4e80d1aefb4f19203361b7199448e70f (patch) | |
tree | b28a68625cec91c57f0383d185f73fdf165ab558 /auth/cli-editor/src/test/java | |
parent | f876b34ec297495df20394c248b899d610e1bcce (diff) |
Use Rhino javascript executor in apex-pdp
Integation unit tests resultd in StackOverflowException errors in the
Graal Javascript interpreter. Following extensive testing and
trouobleshooting, it proved very difficult to fix these issues in Graal
as the stck overflow errors were occurring in native class instantiation
methods being invoked by Grall on the JVM.
The alternative Rhino Javascript engine is developed by mozilla, and was
incorporated into the Java 6 JVM and evolved into Nashorn in the Java 8
JVM. Oracle dropped Nashorn in Java 11. However, in parallel, Rhino
development has continued.
This review brings in the Rhino javascript engine into apex-pdp as the
replacement for Nashorn and instead of Graal. Graal seems to be pretty
unstable as yet so we may bring it in in future releases but for now
Rhino is a more stable and reliable alternative.
Issue-ID: POLICY-2106
Change-Id: I0edeff3b0bee404b38e3ebe22001a6e3375a44dc
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'auth/cli-editor/src/test/java')
-rw-r--r-- | auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java index 9c7143ef1..8cbc1698f 100644 --- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java +++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineEditorEventsContextTest.java @@ -84,8 +84,8 @@ public class CommandLineEditorEventsContextTest { final int logCharCount = logString.replaceAll(SPACES, EMPTY_STRING).length(); final int modelCharCount = modelString.replaceAll(SPACES, EMPTY_STRING).length(); - assertEquals(25996, logCharCount); - assertEquals(46162, modelCharCount); + assertEquals(25892, logCharCount); + assertEquals(46048, modelCharCount); } /** @@ -114,8 +114,8 @@ public class CommandLineEditorEventsContextTest { final int logCharCount = logString.replaceAll(SPACES, EMPTY_STRING).length(); final int modelCharCount = modelString.replaceAll(SPACES, EMPTY_STRING).length(); - assertEquals(30154, logCharCount); - assertEquals(52690, modelCharCount); + assertEquals(30068, logCharCount); + assertEquals(52596, modelCharCount); } |