Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-10988

Properly wait for server in TestThriftServerCmdLine

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.99.0, 0.94.19, 0.98.2, 0.96.3
    • test
    • None
    • Reviewed

    Description

      In 0.94 I find:
      Threads.sleepWithoutInterrupt(2000)

      In trunk I see:

           while ( thriftServer.serverRunner == null || thriftServer.serverRunner.tserver == null ){
             Thread.sleep(1);
           }
      

      Both aren't good.
      The 0.94 version will fail if the server does not come up within 2s. The trunk version (1) might wait forever and cause a long timeout for the test and (2) wait quite busily with only 1ms of sleeping.

      Attachments

        1. 10988-0.94.txt
          0.8 kB
          Lars Hofhansl
        2. 10988-trunk.txt
          0.9 kB
          Lars Hofhansl

        Activity

          People

            larsh Lars Hofhansl
            larsh Lars Hofhansl
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: