zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f..@apache.org
Subject svn commit: r1366384 - in /zookeeper/bookkeeper/trunk: CHANGES.txt bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestBKStats.java hedwig-server/src/test/java/org/apache/hedwig/server/netty/TestServerStats.java
Date Fri, 27 Jul 2012 13:51:22 GMT
Author: fpj
Date: Fri Jul 27 13:51:22 2012
New Revision: 1366384

URL: http://svn.apache.org/viewvc?rev=1366384&view=rev
Log:
BOOKKEEPER-352: Should not use static ServerStats/BKStats instance in TestServerStats/TestBKStats
(sijie via fpj)


Modified:
    zookeeper/bookkeeper/trunk/CHANGES.txt
    zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestBKStats.java
    zookeeper/bookkeeper/trunk/hedwig-server/src/test/java/org/apache/hedwig/server/netty/TestServerStats.java

Modified: zookeeper/bookkeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/CHANGES.txt?rev=1366384&r1=1366383&r2=1366384&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/CHANGES.txt (original)
+++ zookeeper/bookkeeper/trunk/CHANGES.txt Fri Jul 27 13:51:22 2012
@@ -20,6 +20,8 @@ Trunk (unreleased changes)
 
       BOOKKEEPER-292: Test backward compatibility automatically between versions. (ivank)
 
+      BOOKKEEPER-352: Should not use static ServerStats/BKStats instance in TestServerStats/TestBKStats
(sijie via fpj)
+
       bookkeeper-server:
 
         BOOKKEEPER-183: Provide tools to read/check data files in bookie server (sijie via
ivank)

Modified: zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestBKStats.java
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestBKStats.java?rev=1366384&r1=1366383&r2=1366384&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestBKStats.java
(original)
+++ zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestBKStats.java
Fri Jul 27 13:51:22 2012
@@ -35,11 +35,9 @@ public class TestBKStats {
     @Test
     public void testUpdateLatencyShouldNotFailWithAIOBEWithNegativeLatency()
             throws Exception {
-        BKStats stats = BKStats.getInstance();
-        OpStats opStat = stats.getOpStats(0);
+        OpStats opStat = new OpStats();
         opStat.updateLatency(-10);
         assertEquals("Should not update any latency metrics", 0,
                 opStat.numSuccessOps);
-
     }
 }

Modified: zookeeper/bookkeeper/trunk/hedwig-server/src/test/java/org/apache/hedwig/server/netty/TestServerStats.java
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/hedwig-server/src/test/java/org/apache/hedwig/server/netty/TestServerStats.java?rev=1366384&r1=1366383&r2=1366384&view=diff
==============================================================================
--- zookeeper/bookkeeper/trunk/hedwig-server/src/test/java/org/apache/hedwig/server/netty/TestServerStats.java
(original)
+++ zookeeper/bookkeeper/trunk/hedwig-server/src/test/java/org/apache/hedwig/server/netty/TestServerStats.java
Fri Jul 27 13:51:22 2012
@@ -2,7 +2,7 @@ package org.apache.hedwig.server.netty;
 
 import static org.junit.Assert.assertEquals;
 
-import org.apache.hedwig.protocol.PubSubProtocol.OperationType;
+import org.apache.hedwig.server.netty.ServerStats.OpStats;
 import org.junit.Test;
 
 /** Tests that Statistics updation in hedwig Server */
@@ -15,9 +15,7 @@ public class TestServerStats {
     @Test
     public void testUpdateLatencyShouldNotFailWithAIOBEWithNegativeLatency()
             throws Exception {
-        ServerStats stats = ServerStats.getInstance();
-        org.apache.hedwig.server.netty.ServerStats.OpStats opStat = stats
-                .getOpStats(OperationType.SUBSCRIBE);
+        OpStats opStat = new OpStats();
         opStat.updateLatency(-10);
         assertEquals("Should not update any latency metrics", 0,
                 opStat.numSuccessOps);



Mime
View raw message