You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2017/02/21 20:33:35 UTC
svn commit: r1783935 -
/jmeter/trunk/src/components/org/apache/jmeter/assertions/XMLAssertion.java
Author: pmouawad
Date: Tue Feb 21 20:33:35 2017
New Revision: 1783935
URL: http://svn.apache.org/viewvc?rev=1783935&view=rev
Log:
Fix Javadoc and setFailure(true) when doc is not XML
Modified:
jmeter/trunk/src/components/org/apache/jmeter/assertions/XMLAssertion.java
Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/XMLAssertion.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/XMLAssertion.java?rev=1783935&r1=1783934&r2=1783935&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/assertions/XMLAssertion.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/assertions/XMLAssertion.java Tue Feb 21 20:33:35 2017
@@ -55,10 +55,10 @@ public class XMLAssertion extends Abstra
};
/**
- * Returns the result of the Assertion. Here it checks whether the Sample
- * took to long to be considered successful. If so an AssertionResult
- * containing a FailureMessage will be returned. Otherwise the returned
- * AssertionResult will reflect the success of the Sample.
+ * Returns the result of the Assertion.
+ * Here it checks whether the Sample data is XML.
+ * If so an AssertionResult containing a FailureMessage will be returned.
+ * Otherwise the returned AssertionResult will reflect the success of the Sample.
*/
@Override
public AssertionResult getResult(SampleResult response) {
@@ -75,6 +75,7 @@ public class XMLAssertion extends Abstra
builder.parse(new InputSource(new StringReader(resultData)));
} catch (SAXException | IOException e) {
result.setError(true);
+ result.setFailure(true);
result.setFailureMessage(e.getMessage());
}
} else {