Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-6334

TestRMFailover#testAutomaticFailover always passes even when it should fail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.9.0, 3.0.0-alpha4
    • None
    • None
    • Reviewed

    Description

      Due to a bug in while loop.

          int maxWaitingAttempts = 2000;
          while (maxWaitingAttempts-- > 0 ) {
            if (rm.getRMContext().getHAServiceState() == HAServiceState.STANDBY) {
              break;
            }
            Thread.sleep(1);
          }
          Assert.assertFalse("RM didn't transition to Standby ",
              maxWaitingAttempts == 0);
      

      maxWaitingAttempts is -1 if RM didn't transition to Standby.

      Attachments

        1. YARN-6334.001.patch
          2 kB
          Yufei Gu
        2. YARN-6334.002.patch
          2 kB
          Yufei Gu
        3. YARN-6334.003.patch
          2 kB
          Yufei Gu
        4. YARN-6334.004.patch
          2 kB
          Yufei Gu
        5. YARN-6334.005.patch
          3 kB
          Yufei Gu
        6. YARN-6334.branch2.001.patch
          3 kB
          Yufei Gu

        Activity

          People

            yufeigu Yufei Gu
            yufeigu Yufei Gu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: