hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r949920 - in /hbase/trunk: CHANGES.txt src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTClusterTestBase.java
Date Tue, 01 Jun 2010 03:58:28 GMT
Author: apurtell
Date: Tue Jun  1 03:58:27 2010
New Revision: 949920

URL: http://svn.apache.org/viewvc?rev=949920&view=rev
Log:
HBASE-2620 REST tests don't use ephemeral ports

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTClusterTestBase.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=949920&r1=949919&r2=949920&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Tue Jun  1 03:58:27 2010
@@ -365,6 +365,7 @@ Release 0.21.0 - Unreleased
    HBASE-2621  Fix bad link to HFile documentation in javadoc
                (Jeff Hammerbacher via Todd Lipcon)
    HBASE-2371  Fix 'list' command in shell (Alexey Kovyrin via Todd Lipcon)
+   HBASE-2620  REST tests don't use ephemeral ports
 
   IMPROVEMENTS
    HBASE-1760  Cleanup TODOs in HTable

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTClusterTestBase.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTClusterTestBase.java?rev=949920&r1=949919&r2=949920&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTClusterTestBase.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTClusterTestBase.java Tue
Jun  1 03:58:27 2010
@@ -16,9 +16,6 @@ public class HBaseRESTClusterTestBase ex
   static final Log LOG =
     LogFactory.getLog(HBaseRESTClusterTestBase.class);
 
-  // use a nonstandard port
-  static final int DEFAULT_TEST_PORT = 38080;
-
   protected int testServletPort;
   Server server;
 
@@ -49,8 +46,7 @@ public class HBaseRESTClusterTestBase ex
     LOG.info("configured " + ServletContainer.class.getName());
     
     // set up Jetty and run the embedded server
-    testServletPort = conf.getInt("hbase.rest.port", DEFAULT_TEST_PORT);
-    server = new Server(testServletPort);
+    server = new Server(0);
     server.setSendServerVersion(false);
     server.setSendDateHeader(false);
       // set up context
@@ -58,7 +54,9 @@ public class HBaseRESTClusterTestBase ex
     context.addServlet(sh, "/*");
       // start the server
     server.start();
-
+      // get the port
+    testServletPort = server.getConnectors()[0].getLocalPort();
+    
     LOG.info("started " + server.getClass().getName() + " on port " + 
       testServletPort);
   }



Mime
View raw message