commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nico...@apache.org
Subject svn commit: r634923 - in /commons/sandbox/monitoring/trunk: ./ src/test/java/org/apache/commons/monitoring/impl/ src/test/java/org/apache/commons/monitoring/reporting/ src/test/resources/org/apache/commons/monitoring/reporting/
Date Sat, 08 Mar 2008 10:47:30 GMT
Author: nicolas
Date: Sat Mar  8 02:47:27 2008
New Revision: 634923

URL: http://svn.apache.org/viewvc?rev=634923&view=rev
Log:
fix broken tests

Modified:
    commons/sandbox/monitoring/trunk/pom.xml
    commons/sandbox/monitoring/trunk/src/test/java/org/apache/commons/monitoring/impl/DefaultRepositoryTest.java
    commons/sandbox/monitoring/trunk/src/test/java/org/apache/commons/monitoring/reporting/RendererTest.java
    commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.html
    commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.js
    commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.txt
    commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.xml

Modified: commons/sandbox/monitoring/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/pom.xml?rev=634923&r1=634922&r2=634923&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/pom.xml (original)
+++ commons/sandbox/monitoring/trunk/pom.xml Sat Mar  8 02:47:27 2008
@@ -89,6 +89,11 @@
     <url>http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/</url>
   </scm>
   <build>
+  	<resources>
+  	  <resource>
+  	    <directory>${basedir}/src/main/resources</directory>
+  	  </resource>
+  	</resources>
     <plugins>
       <!-- TODO : investigate OSGi support
         <plugin>

Modified: commons/sandbox/monitoring/trunk/src/test/java/org/apache/commons/monitoring/impl/DefaultRepositoryTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/src/test/java/org/apache/commons/monitoring/impl/DefaultRepositoryTest.java?rev=634923&r1=634922&r2=634923&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/src/test/java/org/apache/commons/monitoring/impl/DefaultRepositoryTest.java
(original)
+++ commons/sandbox/monitoring/trunk/src/test/java/org/apache/commons/monitoring/impl/DefaultRepositoryTest.java
Sat Mar  8 02:47:27 2008
@@ -20,12 +20,13 @@
 import java.util.Collection;
 import java.util.Set;
 
+import junit.framework.TestCase;
+
 import org.apache.commons.monitoring.Monitor;
 import org.apache.commons.monitoring.Repository;
+import org.apache.commons.monitoring.Monitor.Key;
 import org.apache.commons.monitoring.impl.repositories.DefaultRepository;
 
-import junit.framework.TestCase;
-
 /**
  * @author <a href="mailto:nicolas@apache.org">Nicolas De Loof</a>
  */
@@ -44,7 +45,7 @@
         Set<String> categories = repository.getCategories();
         assertTrue( categories.contains( "test" ) );
         assertTrue( categories.contains( "junit" ) );
-        assertTrue( categories.contains( null ) );
+        assertTrue( categories.contains( Key.DEFAULT ) );
         assertEquals( 3, categories.size() );
 
         Collection<Monitor> monitors = repository.getMonitorsFromCategory( "test" );
@@ -63,7 +64,7 @@
         Set<String> subsystems = repository.getSubSystems();
         assertTrue( subsystems.contains( "test" ) );
         assertTrue( subsystems.contains( "fake" ) );
-        assertTrue( subsystems.contains( null ) );
+        assertTrue( subsystems.contains( Key.DEFAULT ) );
         assertEquals( 3, subsystems.size() );
 
         Collection<Monitor> monitors = repository.getMonitorsFromSubSystem( "test"
);

Modified: commons/sandbox/monitoring/trunk/src/test/java/org/apache/commons/monitoring/reporting/RendererTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/src/test/java/org/apache/commons/monitoring/reporting/RendererTest.java?rev=634923&r1=634922&r2=634923&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/src/test/java/org/apache/commons/monitoring/reporting/RendererTest.java
(original)
+++ commons/sandbox/monitoring/trunk/src/test/java/org/apache/commons/monitoring/reporting/RendererTest.java
Sat Mar  8 02:47:27 2008
@@ -96,7 +96,7 @@
         counter.add( 1, Unit.MICROS );
         StringWriter writer = new StringWriter();
         renderer.render( new PrintWriter( writer ), counter, "mean", counter.getMean(), options
);
-        assertEquals( " mean=\"500.5\"", writer.toString() );
+        assertEquals( " mean=\"500.50\"", writer.toString() );
     }
 
     protected void assertExpectedRendering( Renderer renderer, String format )

Modified: commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.html
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.html?rev=634923&r1=634922&r2=634923&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.html
(original)
+++ commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.html
Sat Mar  8 02:47:27 2008
@@ -16,12 +16,12 @@
 <tr>
 <td>JsonRendererTest.setUp</td><td>test</td><td>reporting</td>
 <td>0</td><td>0</td><td>-</td><td>-</td><td>0</td>
-<td>1</td><td>10</td><td>10</td><td>10</td><td>10</td><td>-</td><td>10</td>
+<td>1</td><td>10</td><td>10</td><td>10</td><td>10.00</td><td>-</td><td>10</td>
 </tr>
 
 <tr>
 <td>TestCase</td><td>test</td><td>junit</td>
-<td>1</td><td>1</td><td>0</td><td>-</td><td>1</td>
+<td>1</td><td>1</td><td>0.00</td><td>-</td><td>1</td>
 <td>0</td><td>0</td><td>0</td><td>0</td><td>-</td><td>-</td><td>0</td>
 </tr>
 

Modified: commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.js
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.js?rev=634923&r1=634922&r2=634923&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.js
(original)
+++ commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.js
Sat Mar  8 02:47:27 2008
@@ -2,12 +2,12 @@
 
 {
 concurrency:{min:"0",max:"0",mean:"-",deviation:"-",value:"0"},
-performances:{hits:"1",sum:"10",min:"10",max:"10",mean:"10",deviation:"-",value:"10"},
+performances:{hits:"1",sum:"10",min:"10",max:"10",mean:"10.00",deviation:"-",value:"10"},
 key:{name:"JsonRendererTest.setUp",category:"test",subsystem:"reporting"}
 },
 
 {
-concurrency:{min:"1",max:"1",mean:"0",deviation:"-",value:"1"},
+concurrency:{min:"1",max:"1",mean:"0.00",deviation:"-",value:"1"},
 performances:{hits:"0",sum:"0",min:"0",max:"0",mean:"-",deviation:"-",value:"0"},
 key:{name:"TestCase",category:"test",subsystem:"junit"}
 }

Modified: commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.txt
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.txt?rev=634923&r1=634922&r2=634923&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.txt
(original)
+++ commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.txt
Sat Mar  8 02:47:27 2008
@@ -15,7 +15,7 @@
     sum : 10
     min : 10
     max : 10
-    mean : 10
+    mean : 10.00
     deviation : -
     value : 10
 
@@ -27,7 +27,7 @@
 concurrency
     min : 1
     max : 1
-    mean : 0
+    mean : 0.00
     deviation : -
     value : 1
 

Modified: commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.xml?rev=634923&r1=634922&r2=634923&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.xml
(original)
+++ commons/sandbox/monitoring/trunk/src/test/resources/org/apache/commons/monitoring/reporting/RendererTest.xml
Sat Mar  8 02:47:27 2008
@@ -2,11 +2,11 @@
 
 <monitor name="JsonRendererTest.setUp" category="test" subsystem="reporting">
 <concurrency min="0" max="0" mean="-" deviation="-" value="0"/>
-<performances hits="1" sum="10" min="10" max="10" mean="10" deviation="-" value="10"/>
+<performances hits="1" sum="10" min="10" max="10" mean="10.00" deviation="-" value="10"/>
 </monitor>
 
 <monitor name="TestCase" category="test" subsystem="junit">
-<concurrency min="1" max="1" mean="0" deviation="-" value="1"/>
+<concurrency min="1" max="1" mean="0.00" deviation="-" value="1"/>
 <performances hits="0" sum="0" min="0" max="0" mean="-" deviation="-" value="0"/>
 </monitor>
 



Mime
View raw message