[ https://issues.apache.org/jira/browse/HBASE-20543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zheng Hu updated HBASE-20543: ----------------------------- Status: Patch Available (was: Open) > Fix the flaky TestThriftHttpServer > ---------------------------------- > > Key: HBASE-20543 > URL: https://issues.apache.org/jira/browse/HBASE-20543 > Project: HBase > Issue Type: Bug > Affects Versions: 3.0.0 > Reporter: Zheng Hu > Assignee: Zheng Hu > Priority: Major > Fix For: 3.0.0 > > Attachments: HBASE-20543.v1.patch > > > The runThriftServer() in TestThriftHttpServer, we have the following : > {code} > private void runThriftServer(int customHeaderSize) throws Exception { > //...... > startHttpServerThread(args.toArray(new String[args.size()])); > // 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); > } > //...... > checkHttpMethods(url); > //...... > } > {code} > The port may still not open even if the thriftServer.serverRunner != null > and thriftServer.serverRunner.httpServer != null, so the checkHttpMethods > will get a connection refused ... > We should wait till the port is really listening.... -- This message was sent by Atlassian JIRA (v7.6.3#76005)