Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11439

TestWebDelegationToken is flaky

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.7.0
    • None
    • security, test
    • None

    Description

      see https://builds.apache.org/job/PreCommit-HDFS-Build/9101//testReport/org.apache.hadoop.security.token.delegation.web/TestWebDelegationToken/testDelegationTokenAuthenticatorCallsWithQueryString/

      through we have set the port to 0 in

        protected Server createJettyServer() {
          try {
            InetAddress localhost = InetAddress.getLocalHost();
            ServerSocket ss = new ServerSocket(0, 50, localhost);
            int port = ss.getLocalPort();
            ss.close();
            jetty = new Server(0);
            jetty.getConnectors()[0].setHost("localhost");
            jetty.getConnectors()[0].setPort(port);
      

      but in a QA robot env, it still could see the new random port be grab by other testing case or third party applicatons just between "ss.close" and "jetty.start()" call. so we still need a BindException retry here probably.

      Attachments

        Issue Links

          Activity

            People

              xieliang007 Liang Xie
              xieliang007 Liang Xie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: