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:
parent
677738d3ed
commit
5b37b3611f
|
@ -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
|
||||
|
|
|
@ -16,9 +16,6 @@ public class HBaseRESTClusterTestBase extends HBaseClusterTestCase
|
|||
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 extends HBaseClusterTestCase
|
|||
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,6 +54,8 @@ public class HBaseRESTClusterTestBase extends HBaseClusterTestCase
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue