jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1762082 - in /jmeter/trunk: src/core/org/apache/jmeter/util/JSR223TestElement.java src/core/org/apache/jmeter/util/ScriptingTestElement.java xdocs/changes.xml
Date Fri, 23 Sep 2016 21:30:13 GMT
On 23 September 2016 at 20:28,  <agomes@apache.org> wrote:
> Author: agomes
> Date: Fri Sep 23 19:28:58 2016
> New Revision: 1762082
>
> URL: http://svn.apache.org/viewvc?rev=1762082&view=rev
> Log:
> This closes #223

Bugzilla Id?

> Modified:
>     jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java
>     jmeter/trunk/src/core/org/apache/jmeter/util/ScriptingTestElement.java
>     jmeter/trunk/xdocs/changes.xml
>
> Modified: jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java?rev=1762082&r1=1762081&r2=1762082&view=diff
> ==============================================================================
> --- jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java (original)
> +++ jmeter/trunk/src/core/org/apache/jmeter/util/JSR223TestElement.java Fri Sep 23 19:28:58
2016
> @@ -66,6 +66,8 @@ public abstract class JSR223TestElement
>      }
>
>      private static final long serialVersionUID = 233L;
> +
> +    private static final Logger log = LoggingManager.getLoggerForClass();
>
>      /** If not empty then script in ScriptText will be compiled and cached */
>      private String cacheKey = "";
> @@ -86,11 +88,16 @@ public abstract class JSR223TestElement
>      }
>
>      protected ScriptEngine getScriptEngine() throws ScriptException {
> -        final String lang = getScriptLanguage();
> +        String lang = getScriptLanguage();
> +
> +        if (StringUtils.isEmpty(lang)) {
> +            lang = DEFAULT_SCRIPT_LANGUAGE;
> +            setScriptLanguage(lang);
> +        }
>
>          ScriptEngine scriptEngine = getInstance().getEngineByName(lang);
>          if (scriptEngine == null) {
> -            throw new ScriptException("Cannot find engine named: '"+lang+"', ensure
you set language field in JSR223 Test Element:"+getName());
> +            throw new ScriptException("Cannot find engine named: '"+lang+"', ensure
you set language field in JSR223 Test Element: "+getName());
>          }
>
>          return scriptEngine;
>
> Modified: jmeter/trunk/src/core/org/apache/jmeter/util/ScriptingTestElement.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/ScriptingTestElement.java?rev=1762082&r1=1762081&r2=1762082&view=diff
> ==============================================================================
> --- jmeter/trunk/src/core/org/apache/jmeter/util/ScriptingTestElement.java (original)
> +++ jmeter/trunk/src/core/org/apache/jmeter/util/ScriptingTestElement.java Fri Sep 23
19:28:58 2016
> @@ -36,6 +36,8 @@ public abstract class ScriptingTestEleme
>      private String script = ""; // script (if file not provided)
>
>      protected String scriptLanguage = ""; // BSF/JSR223 language to use
> +
> +    protected final static String DEFAULT_SCRIPT_LANGUAGE = "groovy"; // if no language
is chosen in GUI
>      //-- For TestBean implementations only
>
>      public ScriptingTestElement() {
>
> Modified: jmeter/trunk/xdocs/changes.xml
> URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1762082&r1=1762081&r2=1762082&view=diff
> ==============================================================================
> --- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
> +++ jmeter/trunk/xdocs/changes.xml [utf-8] Fri Sep 23 19:28:58 2016
> @@ -161,6 +161,7 @@ Summary
>      <li><bug>60137</bug>In Distributed testing when using StrippedXXXX
modes strip response also on error</li>
>      <li><bug>60106</bug>Settings defaults : Switch "jmeter.save.saveservice.connect_time"
to true (after 3.0)</li>
>      <li><pr>229</pr> tiny memory allocation improvements. Contributed
by Benoit Wiart (b.wiart at ubik-ingenierie.com)</li>
> +    <li><bug>59945</bug>For all JSR223 elements, if script language
has not been chosen on the UI, the script will be interpreted as a groovy script.</li>
>  </ul>
>
>  <ch_section>Non-functional changes</ch_section>
>
>

Mime
View raw message