zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject svn commit: r1611714 - in /zookeeper/trunk: CHANGES.txt src/java/test/org/apache/zookeeper/server/admin/JettyAdminServerTest.java
Date Fri, 18 Jul 2014 17:04:25 GMT
Author: phunt
Date: Fri Jul 18 17:04:25 2014
New Revision: 1611714

URL: http://svn.apache.org/r1611714
Log:
ZOOKEEPER-1969. Fix Port Already In Use for JettyAdminServerTest (Hongchao Deng via phunt)

Modified:
    zookeeper/trunk/CHANGES.txt
    zookeeper/trunk/src/java/test/org/apache/zookeeper/server/admin/JettyAdminServerTest.java

Modified: zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1611714&r1=1611713&r2=1611714&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Fri Jul 18 17:04:25 2014
@@ -702,6 +702,9 @@ BUGFIXES:
   ZOOKEEPER-1683. ZooKeeper client NPE when updating server list on disconnected
   client (shralex via michim)
 
+  ZOOKEEPER-1969. Fix Port Already In Use for JettyAdminServerTest
+  (Hongchao Deng via phunt)
+
 IMPROVEMENTS:
 
   ZOOKEEPER-1170. Fix compiler (eclipse) warnings: unused imports,

Modified: zookeeper/trunk/src/java/test/org/apache/zookeeper/server/admin/JettyAdminServerTest.java
URL: http://svn.apache.org/viewvc/zookeeper/trunk/src/java/test/org/apache/zookeeper/server/admin/JettyAdminServerTest.java?rev=1611714&r1=1611713&r2=1611714&view=diff
==============================================================================
--- zookeeper/trunk/src/java/test/org/apache/zookeeper/server/admin/JettyAdminServerTest.java
(original)
+++ zookeeper/trunk/src/java/test/org/apache/zookeeper/server/admin/JettyAdminServerTest.java
Fri Jul 18 17:04:25 2014
@@ -40,11 +40,13 @@ public class JettyAdminServerTest extend
     protected static final Logger LOG = LoggerFactory.getLogger(JettyAdminServerTest.class);
 
     private static final String URL_FORMAT = "http://localhost:%d/commands";
+    private static final int jettyAdminPort = PortAssignment.unique();
 
     @Before
     public void enableServer() {
         // Override setting in ZKTestCase
         System.setProperty("zookeeper.admin.enableServer", "true");
+        System.setProperty("zookeeper.admin.serverPort", "" + jettyAdminPort);
     }
 
     /**
@@ -55,7 +57,7 @@ public class JettyAdminServerTest extend
         JettyAdminServer server = new JettyAdminServer();;
         try {
             server.start();
-            queryAdminServer(JettyAdminServer.DEFAULT_PORT);
+            queryAdminServer(jettyAdminPort);
         } finally {
             server.shutdown();
         }
@@ -77,7 +79,7 @@ public class JettyAdminServerTest extend
                 ClientBase.waitForServerUp("127.0.0.1:" + CLIENT_PORT,
                 ClientBase.CONNECTION_TIMEOUT));
 
-        queryAdminServer(JettyAdminServer.DEFAULT_PORT);
+        queryAdminServer(jettyAdminPort);
 
         main.shutdown();
 



Mime
View raw message