mirror of https://github.com/apache/jmeter.git
Bug 58406 - IfController : Allow use of Nashorn Engine if available for JavaScript evaluation
Apply what has been discussed at:
- http://mail-archives.apache.org/mod_mbox/jmeter-dev/201509.mbox/%3C55F9CB45.9040203%40internetallee.de%3E
Rename property and make Rhino still the default.
Add a note.
Bugzilla Id: 58406
git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1706622 13f79535-47bb-0310-9956-ffa450edef68
Former-commit-id: 7f940ba5ec
This commit is contained in:
parent
02600d4673
commit
ffa91ea92f
|
|
@ -1023,12 +1023,12 @@ beanshell.server.file=../extras/startup.bsh
|
|||
# Default is true. Use false to revert to previous behaviour
|
||||
#CookieManager.check.cookies=true
|
||||
|
||||
# Ability to revert to Rhino as default Javascript Engine used by IfController
|
||||
# Ability to switch to Nashorn as default Javascript Engine used by IfController and __javaScript function
|
||||
# JMeter works as following:
|
||||
# - JDK < 8 : Rhino
|
||||
# - JDK >= 8 : Nashorn
|
||||
# If you want to use Rhino on JDK8, set this property to true
|
||||
#ifcontroller.use_rhino=false
|
||||
# - JDK >= 8 and javascript.use_rhino=false: Nashorn
|
||||
# If you want to use Nashorn on JDK8, set this property to false
|
||||
#javascript.use_rhino=true
|
||||
|
||||
# (2.0.3) JMeterThread behaviour has been changed to set the started flag before
|
||||
# the controllers are initialised. This is so controllers can access variables earlier.
|
||||
|
|
|
|||
|
|
@ -72,11 +72,11 @@ public class IfController extends GenericController implements Serializable, Thr
|
|||
|
||||
private static final String USE_EXPRESSION = "IfController.useExpression"; //$NON-NLS-1$
|
||||
|
||||
private static final String USE_RHINO_ENGINE_PROPERTY = "ifcontroller.use_rhino";
|
||||
private static final String USE_RHINO_ENGINE_PROPERTY = "javascript.use_rhino"; //$NON-NLS-1$
|
||||
|
||||
private static final boolean USE_RHINO_ENGINE =
|
||||
getInstance().getEngineByName("nashorn") == null || //$NON-NLS-1$
|
||||
JMeterUtils.getPropDefault(USE_RHINO_ENGINE_PROPERTY, false) ;
|
||||
JMeterUtils.getPropDefault(USE_RHINO_ENGINE_PROPERTY, true) ;
|
||||
|
||||
|
||||
private static final ThreadLocal<ScriptEngine> NASHORN_ENGINE = new ThreadLocal<ScriptEngine>() {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,9 @@ Summary
|
|||
|
||||
<ul>
|
||||
<li>In RandomTimer class, protected instance timer has been replaced by getTimer() protected method, this is related to <bugzilla>58100</bugzilla>. This may impact 3rd party plugins.</li>
|
||||
<li>If Controller will now use by default Nashorn Engine under Java8. If you want to revert to Rhino Engine, use property <code>ifcontroller.use_rhino=true</code>, see <bugzilla>58406</bugzilla></li>
|
||||
<li>Since version 2.14, you can use Nashorn Engine (default javascript engine is Rhino) under Java8 for Elements that use Javascript Engine (__javaScript, IfController). If you want to use it, use property <code>javascript.use_rhino=false</code>, see <bugzilla>58406</bugzilla>.
|
||||
Note in future versions, we will switch to Nashorn by default, so users are encouraged to report any issue related to broken code when using Nashorn instead of Rhino.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- =================== Improvements =================== -->
|
||||
|
|
@ -95,7 +97,7 @@ Summary
|
|||
|
||||
<h3>Controllers</h3>
|
||||
<ul>
|
||||
<li><bug>58406</bug>IfController : Use Nashorn Engine if available for JavaScript evaluation</li>
|
||||
<li><bug>58406</bug>IfController : Allow use of Nashorn Engine if available for JavaScript evaluation</li>
|
||||
<li><bug>58281</bug>RandomOrderController : Improve randomization algorithm performance. Contributed by Graham Russell (jmeter at ham1.co.uk)</li>
|
||||
</ul>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue