jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1295093 - /jmeter/trunk/test/src/org/apache/jmeter/monitor/model/TestObjectFactory.java
Date Wed, 29 Feb 2012 13:23:31 GMT
Author: sebb
Date: Wed Feb 29 13:23:30 2012
New Revision: 1295093

URL: http://svn.apache.org/viewvc?rev=1295093&view=rev
Log:
Failure in Gump was due to different order of tests
Change order to produce failure in non-Gump runs as well

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=1295093&r1=1295092&r2=1295093&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 Wed Feb 29
13:23:30 2012
@@ -27,68 +27,31 @@ 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.toString());
-        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();
-    }
 
-    private void printStatus(String caller, Status s){
-        if (s != null) {
-            if (isGump) {
-                System.out.println(caller+":"+formatStatus(status));
-            }            
-        }
+    public void testStatus() throws Exception {
+        status = of.parseString("<status></status>");
+        assertNotNull(status);
     }
+
     public void testNoStatus() throws Exception {
         status = of.parseString("<a></a>");
-        if (status != null) {
-            fail("Expected null status, but was "+formatStatus(status));
-        }
-    }
-
-    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();
     }
     



Mime
View raw message