jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1293283 - /jmeter/trunk/test/src/org/apache/jmeter/monitor/model/TestObjectFactory.java
Date Fri, 24 Feb 2012 15:05:05 GMT
Author: sebb
Date: Fri Feb 24 15:05:05 2012
New Revision: 1293283

URL: http://svn.apache.org/viewvc?rev=1293283&view=rev
Log:
Try to find out why Gump is creating a status entry

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/monitor/model/TestObjectFactory.java

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=1293283&r1=1293282&r2=1293283&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 Fri Feb 24
15:05:05 2012
@@ -32,9 +32,34 @@ public class TestObjectFactory extends J
         of = ObjectFactory.getInstance();
     }
 
+    private String formatStatus(Status s) {
+        StringBuilder sb = new StringBuilder();
+        sb.append(s.getClass().getName());
+        sb.append(" ");
+        sb.append(s.getConnectorPrefix());
+        final Jvm jvm = s.getJvm();
+        if (jvm != null) {
+            sb.append(' ');
+            sb.append(jvm.toString());
+            final Memory memory = jvm.getMemory();
+            if (memory != null) {
+                sb.append(' ');
+                sb.append(memory.toString());
+                sb.append(memory.getFree());
+                sb.append(' ');
+                sb.append(memory.getMax());
+                sb.append(' ');
+                sb.append(memory.getTotal());
+            }
+        }
+        return sb.toString();
+    }
+
     public void testNoStatus() throws Exception {
         status = of.parseString("<a></a>");
-        assertNull(status);
+        if (status != null) {
+            fail("Expected null status, but was "+formatStatus(status));
+        }
     }
 
     public void testStatus() throws Exception {



Mime
View raw message