zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f..@apache.org
Subject svn commit: r1366409 - in /zookeeper/bookkeeper/branches/branch-4.1: 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 15:07:56 GMT
Author: fpj
Date: Fri Jul 27 15:07:56 2012
New Revision: 1366409

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


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

Modified: zookeeper/bookkeeper/branches/branch-4.1/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/branches/branch-4.1/CHANGES.txt?rev=1366409&r1=1366408&r2=1366409&view=diff
==============================================================================
--- zookeeper/bookkeeper/branches/branch-4.1/CHANGES.txt (original)
+++ zookeeper/bookkeeper/branches/branch-4.1/CHANGES.txt Fri Jul 27 15:07:56 2012
@@ -10,7 +10,9 @@ Release 4.1.1 - UNRELEASED
 
     BUGFIXES:
 
-      BOOKKEEPER-298: We run with preferIPv4Stack in the scripts but not in the tests (ivank)
+      BOOKKEEPER-298: We run with preferIPv4Stack in the scripts but not in the tests (ivank)Q
+
+      BOOKKEEPER-352: Should not use static ServerStats/BKStats instance in TestServerStats/TestBKStats
(sijie via fpj)
 
       bookkeeper-server/
 

Modified: zookeeper/bookkeeper/branches/branch-4.1/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestBKStats.java
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/branches/branch-4.1/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestBKStats.java?rev=1366409&r1=1366408&r2=1366409&view=diff
==============================================================================
--- zookeeper/bookkeeper/branches/branch-4.1/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestBKStats.java
(original)
+++ zookeeper/bookkeeper/branches/branch-4.1/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestBKStats.java
Fri Jul 27 15:07:56 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/branches/branch-4.1/hedwig-server/src/test/java/org/apache/hedwig/server/netty/TestServerStats.java
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/branches/branch-4.1/hedwig-server/src/test/java/org/apache/hedwig/server/netty/TestServerStats.java?rev=1366409&r1=1366408&r2=1366409&view=diff
==============================================================================
--- zookeeper/bookkeeper/branches/branch-4.1/hedwig-server/src/test/java/org/apache/hedwig/server/netty/TestServerStats.java
(original)
+++ zookeeper/bookkeeper/branches/branch-4.1/hedwig-server/src/test/java/org/apache/hedwig/server/netty/TestServerStats.java
Fri Jul 27 15:07:56 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