You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2014/02/24 15:04:07 UTC

svn commit: r1571290 - in /jmeter/trunk: src/core/org/apache/jmeter/util/BeanShellClient.java xdocs/changes.xml

Author: sebb
Date: Mon Feb 24 14:04:07 2014
New Revision: 1571290

URL: http://svn.apache.org/r1571290
Log:
Can't trigger bsh script using bshclient.jar; socket is closed unexpectedly
Bugzilla Id: 56182

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellClient.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellClient.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellClient.java?rev=1571290&r1=1571289&r2=1571290&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellClient.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellClient.java Mon Feb 24 14:04:07 2014
@@ -58,7 +58,8 @@ public class BeanShellClient {
 
         InputStreamReader fis = new FileReader(file);
 
-        new SockRead(is).start();
+        final SockRead sockRead = new SockRead(is);
+        sockRead.start();
 
         sendLine("bsh.prompt=\"\";",os);// Prompt is unnecessary
 
@@ -75,8 +76,9 @@ public class BeanShellClient {
         fis.close();
         sendLine("bsh.prompt=\"bsh % \";",os);// Reset for other users
         os.flush();
-        os.close();
         sock.shutdownOutput(); // Tell server that we are done
+        sockRead.join(); // wait for script to finish
+        os.close();
     }
 
     private static void sendLine( String line, OutputStream outPipe )

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1571290&r1=1571289&r2=1571290&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Mon Feb 24 14:04:07 2014
@@ -157,6 +157,7 @@ A workaround is to use a Java 7 update 4
 <ul>
 <li><bugzilla>56059</bugzilla> - Older TestBeans incompatible with 2.11 when using TextAreaEditor</li>
 <li><bugzilla>56080</bugzilla> - Conversion error com.thoughtworks.xstream.converters.ConversionException with Java 8 Early Access Build</li>
+<li><bugzilla>56182</bugzilla> - Can't trigger bsh script using bshclient.jar; socket is closed unexpectedly </li>
 </ul>
 
 <!-- =================== Improvements =================== -->