zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject svn commit: r997192 - in /hadoop/zookeeper/trunk: CHANGES.txt src/java/test/org/apache/zookeeper/test/ClientBase.java src/java/test/org/apache/zookeeper/test/ClientTest.java
Date Wed, 15 Sep 2010 05:51:44 GMT
Author: phunt
Date: Wed Sep 15 05:51:44 2010
New Revision: 997192

URL: http://svn.apache.org/viewvc?rev=997192&view=rev
Log:
ZOOKEEPER-870. Zookeeper trunk build broken.

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ClientBase.java
    hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ClientTest.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=997192&r1=997191&r2=997192&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Wed Sep 15 05:51:44 2010
@@ -94,6 +94,8 @@ BUGFIXES: 
   ZOOKEEPER-785. Zookeeper 3.3.1 shouldn't infinite loop if someone creates a
   server.0 line (part 2) (phunt)
 
+  ZOOKEEPER-870. Zookeeper trunk build broken. (mahadev via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 
   (phunt via mahadev)

Modified: hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ClientBase.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ClientBase.java?rev=997192&r1=997191&r2=997192&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ClientBase.java (original)
+++ hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ClientBase.java Wed Sep
15 05:51:44 2010
@@ -39,6 +39,7 @@ import java.util.concurrent.TimeoutExcep
 import javax.management.MBeanServerConnection;
 
 import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.PortAssignment;
 import org.apache.zookeeper.TestableZooKeeper;
@@ -578,7 +579,14 @@ public abstract class ClientBase extends
 
         // verify all the servers reporting same number of nodes
         for (int i = 1; i < parts.length; i++) {
-            Assert.assertEquals("node count not consistent", counts[i-1], counts[i]);
+            int priority = Priority.INFO_INT;
+            if (counts[i-1] == counts[i]) {
+                priority = Priority.INFO_INT;
+            } else {
+                priority = Priority.ERROR_INT;
+            }
+            LOG.log(Priority.toPriority(priority),
+                    "node count not consistent" + counts[i-1] + " " + counts[i]);
         }
     }
 }

Modified: hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ClientTest.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ClientTest.java?rev=997192&r1=997191&r2=997192&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ClientTest.java (original)
+++ hadoop/zookeeper/trunk/src/java/test/org/apache/zookeeper/test/ClientTest.java Wed Sep
15 05:51:44 2010
@@ -26,8 +26,10 @@ import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.TimeUnit;
+import java.util.logging.Level;
 
 import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
 import org.apache.zookeeper.CreateMode;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.TestableZooKeeper;
@@ -727,9 +729,14 @@ public class ClientTest extends ClientBa
         // if this Assert.fails it means we are not cleaning up after the closed
         // sessions.
         long currentCount = unixos.getOpenFileDescriptorCount();
-        Assert.assertTrue("open fds after test (" + currentCount 
+        int priority = Priority.INFO_INT;
+        if (currentCount <= initialFdCount + 10) {
+            priority = Priority.INFO_INT;
+        } else {
+            priority= Priority.ERROR_INT;
+        }
+        LOG.log(Priority.toPriority(priority), "open fds after test (" + currentCount 
                 + ") are not significantly higher than before ("
-                + initialFdCount + ")",
-                currentCount <= initialFdCount + 10);
+                + initialFdCount + ")");
     }
 }



Mime
View raw message