HBASE-10988 Properly wait for server in TestThriftServerCmdLine.

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1588016 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
larsh 2014-04-16 18:24:45 +00:00
parent d177b9b9a2
commit e53b86fe92
1 changed files with 3 additions and 2 deletions

View File

@ -174,8 +174,9 @@ public class TestThriftServerCmdLine {
thriftServer = new ThriftServer(TEST_UTIL.getConfiguration());
startCmdLineThread(args.toArray(new String[0]));
while ( thriftServer.serverRunner == null || thriftServer.serverRunner.tserver == null ){
Thread.sleep(1);
// wait up to 10s for the server to start
for (int i=0; i<100 && (thriftServer.serverRunner == null || thriftServer.serverRunner.tserver == null); i++) {
Thread.sleep(100);
}
Class<? extends TServer> expectedClass = implType != null ?