HBASE-2620 REST tests don't use ephemeral ports

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@949920 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Kyle Purtell 2010-06-01 03:58:27 +00:00
parent 677738d3ed
commit 5b37b3611f
2 changed files with 5 additions and 6 deletions

View File

@ -365,6 +365,7 @@ Release 0.21.0 - Unreleased
HBASE-2621 Fix bad link to HFile documentation in javadoc HBASE-2621 Fix bad link to HFile documentation in javadoc
(Jeff Hammerbacher via Todd Lipcon) (Jeff Hammerbacher via Todd Lipcon)
HBASE-2371 Fix 'list' command in shell (Alexey Kovyrin 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 IMPROVEMENTS
HBASE-1760 Cleanup TODOs in HTable HBASE-1760 Cleanup TODOs in HTable

View File

@ -16,9 +16,6 @@ public class HBaseRESTClusterTestBase extends HBaseClusterTestCase
static final Log LOG = static final Log LOG =
LogFactory.getLog(HBaseRESTClusterTestBase.class); LogFactory.getLog(HBaseRESTClusterTestBase.class);
// use a nonstandard port
static final int DEFAULT_TEST_PORT = 38080;
protected int testServletPort; protected int testServletPort;
Server server; Server server;
@ -49,8 +46,7 @@ public class HBaseRESTClusterTestBase extends HBaseClusterTestCase
LOG.info("configured " + ServletContainer.class.getName()); LOG.info("configured " + ServletContainer.class.getName());
// set up Jetty and run the embedded server // set up Jetty and run the embedded server
testServletPort = conf.getInt("hbase.rest.port", DEFAULT_TEST_PORT); server = new Server(0);
server = new Server(testServletPort);
server.setSendServerVersion(false); server.setSendServerVersion(false);
server.setSendDateHeader(false); server.setSendDateHeader(false);
// set up context // set up context
@ -58,7 +54,9 @@ public class HBaseRESTClusterTestBase extends HBaseClusterTestCase
context.addServlet(sh, "/*"); context.addServlet(sh, "/*");
// start the server // start the server
server.start(); server.start();
// get the port
testServletPort = server.getConnectors()[0].getLocalPort();
LOG.info("started " + server.getClass().getName() + " on port " + LOG.info("started " + server.getClass().getName() + " on port " +
testServletPort); testServletPort);
} }