jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1240582 - /jmeter/trunk/src/components/org/apache/jmeter/timers/BSFTimer.java
Date Sat, 04 Feb 2012 18:33:56 GMT
Author: pmouawad
Date: Sat Feb  4 18:33:56 2012
New Revision: 1240582

URL: http://svn.apache.org/viewvc?rev=1240582&view=rev
Log:
Ensure terminate is called

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/timers/BSFTimer.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/timers/BSFTimer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/timers/BSFTimer.java?rev=1240582&r1=1240581&r2=1240582&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/timers/BSFTimer.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/timers/BSFTimer.java Sat Feb  4 18:33:56
2012
@@ -33,8 +33,9 @@ public class BSFTimer extends BSFTestEle
     /** {@inheritDoc} */
     public long delay() {
         long delay = 0;
+        BSFManager mgr = null;
         try {
-            BSFManager mgr = getManager();
+            mgr = getManager();
             Object o = evalFileOrScript(mgr);
             if (o == null) {
                 log.warn("Script did not return a value");
@@ -45,6 +46,10 @@ public class BSFTimer extends BSFTestEle
             log.warn("Problem in BSF script "+e);
         } catch (BSFException e) {
             log.warn("Problem in BSF script "+e);
+        } finally {
+            if(mgr != null) {
+                mgr.terminate();
+            }
         }
         return delay;
     }



Mime
View raw message