jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From milam...@apache.org
Subject svn commit: r1457495 - /jmeter/trunk/src/protocol/mongodb/org/apache/jmeter/protocol/mongodb/sampler/MongoScriptSampler.java
Date Sun, 17 Mar 2013 17:37:58 GMT
Author: milamber
Date: Sun Mar 17 17:37:58 2013
New Revision: 1457495

URL: http://svn.apache.org/r1457495
Log:
Fix a twice call of sampleEnd
Bugzilla Id: 54584

Modified:
    jmeter/trunk/src/protocol/mongodb/org/apache/jmeter/protocol/mongodb/sampler/MongoScriptSampler.java

Modified: jmeter/trunk/src/protocol/mongodb/org/apache/jmeter/protocol/mongodb/sampler/MongoScriptSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/mongodb/org/apache/jmeter/protocol/mongodb/sampler/MongoScriptSampler.java?rev=1457495&r1=1457494&r2=1457495&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/mongodb/org/apache/jmeter/protocol/mongodb/sampler/MongoScriptSampler.java
(original)
+++ jmeter/trunk/src/protocol/mongodb/org/apache/jmeter/protocol/mongodb/sampler/MongoScriptSampler.java
Sun Mar 17 17:37:58 2013
@@ -75,22 +75,18 @@ public class MongoScriptSampler
             DB db = mongoDB.getDB(getDatabase(), getUsername(), getPassword());
             res.latencyEnd();
             Object result = runner.evaluate(db, data);
-            res.sampleEnd();
             EvalResultHandler handler = new EvalResultHandler();
             String resultAsString = handler.handle(result);
             res.setResponseData(resultAsString.getBytes());
-        }
-        catch (Exception ex) {
+        } catch (Exception ex) {
             res.sampleEnd();
             res.setResponseCode("500"); // $NON-NLS-1$
             res.setSuccessful(false);
             res.setResponseMessage(ex.toString());
             res.setResponseData(ex.getMessage().getBytes());
-        }
-        finally {
+        } finally {
             res.sampleEnd();
         }
-
         return res;
     }
 



Mime
View raw message