You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Duo Zhang (JIRA)" <ji...@apache.org> on 2018/07/07 07:28:00 UTC

[jira] [Updated] (HBASE-20543) Fix the flaky TestThriftHttpServer

     [ https://issues.apache.org/jira/browse/HBASE-20543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Duo Zhang updated HBASE-20543:
------------------------------
    Fix Version/s: 2.2.0
                   2.1.0

> 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, 2.1.0, 2.2.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)