HBASE-21546 ConnectException in TestThriftHttpServer

Signed-off-by: Sean Busbey <busbey@apache.org>
This commit is contained in:
Peter Somogyi 2018-12-04 14:57:50 +01:00
parent 547f3fc2dc
commit 333cd19728

View File

@ -43,7 +43,6 @@ import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.transport.THttpClient;
import org.apache.thrift.transport.TTransportException;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@ -186,11 +185,7 @@ public class TestThriftHttpServer {
private void waitThriftServerStartup() throws Exception{
// wait up to 10s for the server to start
for (int i = 0; i < 100
&& ( thriftServer.serverRunner == null || thriftServer.serverRunner.httpServer ==
null); i++) {
Thread.sleep(100);
}
HBaseTestingUtility.waitForHostPort(HConstants.LOCALHOST, port);
}
private void runThriftServer(int customHeaderSize) throws Exception {
@ -269,7 +264,7 @@ public class TestThriftHttpServer {
}
private void stopHttpServerThread() throws Exception {
LOG.debug("Stopping " + " Thrift HTTP server");
LOG.debug("Stopping Thrift HTTP server");
thriftServer.stop();
httpServerThread.join();
if (httpServerException != null) {