Author: sebb
Date: Tue Feb 28 00:54:08 2012
New Revision: 1294427
URL: http://svn.apache.org/viewvc?rev=1294427&view=rev
Log:
Add a bit more info to try and track down Gump test error
Modified:
jmeter/trunk/build.xml
jmeter/trunk/test/src/org/apache/jmeter/monitor/model/TestObjectFactory.java
Modified: jmeter/trunk/build.xml
URL:
http://svn.apache.org/viewvc/jmeter/trunk/build.xml?rev=1294427&r1=1294426&r2=1294427&view=diff
==============================================================================
--- jmeter/trunk/build.xml (original)
+++ jmeter/trunk/build.xml Tue Feb 28 00:54:08 2012
@@ -2229,6 +2229,7 @@ run JMeter unless all the JMeter jars ar
<jvmarg value="-Dfile.encoding=${test.encoding}"/>
<sysproperty key="java.awt.headless" value="${test.headless}"/>
<sysproperty key="testsaveservice.saveout"
value="${testsaveservice.saveout}" />
+ <sysproperty key="gump.run" value="${gump.run}" />
<arg value="${build.test}"/>
<arg value="${basedir}/bin/testfiles/jmetertest.properties"/>
<arg value="org.apache.jmeter.util.JMeterUtils"/>
Modified:
jmeter/trunk/test/src/org/apache/jmeter/monitor/model/TestObjectFactory.java
URL:
http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/monitor/model/TestObjectFactory.java?rev=1294427&r1=1294426&r2=1294427&view=diff
==============================================================================
---
jmeter/trunk/test/src/org/apache/jmeter/monitor/model/TestObjectFactory.java
(original)
+++
jmeter/trunk/test/src/org/apache/jmeter/monitor/model/TestObjectFactory.java
Tue Feb 28 00:54:08 2012
@@ -27,14 +27,17 @@ public class TestObjectFactory extends J
private Status status;
+ private boolean isGump;
+
@Override
public void setUp(){
of = ObjectFactory.getInstance();
+ isGump = Boolean.parseBoolean(System.getProperty("gump.run","false"));
}
private String formatStatus(Status s) {
StringBuilder sb = new StringBuilder();
- sb.append(s.getClass().getName());
+ sb.append(s.toString());
sb.append(" ");
sb.append(s.getConnectorPrefix());
final Jvm jvm = s.getJvm();
@@ -55,6 +58,13 @@ public class TestObjectFactory extends J
return sb.toString();
}
+ private void printStatus(String caller, Status s){
+ if (s != null) {
+ if (isGump) {
+ System.out.println(caller+":"+formatStatus(status));
+ }
+ }
+ }
public void testNoStatus() throws Exception {
status = of.parseString("<a></a>");
if (status != null) {
@@ -65,17 +75,20 @@ public class TestObjectFactory extends J
public void testStatus() throws Exception {
status = of.parseString("<status></status>");
assertNotNull(status);
+ printStatus("testStatus", status);
}
public void testFileData() throws Exception {
byte[] bytes=
FileUtils.readFileToByteArray(findTestFile("testfiles/monitorStatus.xml"));
status = of.parseBytes(bytes);
+ printStatus("testFileData", status);
checkResult();
}
public void testStringData() throws Exception {
String content =
FileUtils.readFileToString(findTestFile("testfiles/monitorStatus.xml"));
status = of.parseString(content);
+ printStatus("testStringData", status);
checkResult();
}