jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1302016 - in /jmeter/trunk: src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java xdocs/changes.xml
Date Sat, 17 Mar 2012 21:34:18 GMT
Author: pmouawad
Date: Sat Mar 17 21:34:17 2012
New Revision: 1302016

URL: http://svn.apache.org/viewvc?rev=1302016&view=rev
Log:
JDBC Sampler : Sampler is not marked in error in an Exception which is not of class IOException,
SQLException, IOException occurs

Modified:
    jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java?rev=1302016&r1=1302015&r2=1302016&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
(original)
+++ jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
Sat Mar 17 21:34:17 2012
@@ -18,7 +18,6 @@
 
 package org.apache.jmeter.protocol.jdbc.sampler;
 
-import java.io.IOException;
 import java.sql.Connection;
 import java.sql.SQLException;
 
@@ -79,14 +78,12 @@ public class JDBCSampler extends Abstrac
             final String errCode = Integer.toString(ex.getErrorCode());
             res.setResponseMessage(ex.toString());
             res.setResponseCode(ex.getSQLState()+ " " +errCode);
+            res.setResponseData(ex.getMessage().getBytes());
             res.setSuccessful(false);
-        } catch (UnsupportedOperationException ex) {
+        } catch (Exception ex) {
             res.setResponseMessage(ex.toString());
-            res.setResponseCode("000"); // TODO - is this correct?
-            res.setSuccessful(false);
-        } catch (IOException ex) {
-            res.setResponseMessage(ex.toString());
-            res.setResponseCode("000"); // TODO - is this correct?
+            res.setResponseCode("000");
+            res.setResponseData(ex.getMessage().getBytes());
             res.setSuccessful(false);
         } finally {
             close(conn);

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1302016&r1=1302015&r2=1302016&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Sat Mar 17 21:34:17 2012
@@ -63,7 +63,6 @@ or a Debug Sampler with all fields set t
 When doing replacement of User Defined Variables, Proxy will not substitute partial values
anymore when "Regexp matching" is used. It will use Perl 5 word matching ("\b")
 </p>
 
-
 <!-- =================== Bug fixes =================== -->
 
 <h2>Bug fixes</h2>
@@ -84,6 +83,7 @@ When doing replacement of User Defined V
 <li>Bug 51737 - TCPSampler : Packet gets converted/corrupted</li>
 <li>Bug 52868 - BSF language list should be sorted</li>
 <li>Bug 52869 - JSR223 language list currently uses BSF list which is wrong</li>
+<li>Bug 52932 - JDBC Sampler : Sampler is not marked in error in an Exception which
is not of class IOException, SQLException, IOException occurs</li>
 </ul>
 
 <h3>Controllers</h3>



Mime
View raw message