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

TestRMWebServicesAppsModification dependent on yarn-default.xml

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.0
    • Component/s: None
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      TestRMWebServicesAppsModification.java has some errors that are yarn-default.xml dependent. By changing yarn-default.xml properties, I'm seeing the following errors:

      1) Changing yarn.resourcemanager.scheduler.class from capacity.CapacityScheduler to fair.FairScheduler gives the error:

      Running org.apache.hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesAppsModification
      Tests run: 10, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 79.047 sec <<< FAILURE! - in org.apache.hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesAppsModification
      testSingleAppKillUnauthorized[1](org.apache.hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesAppsModification) Time elapsed: 3.22 sec <<< FAILURE!
      java.lang.AssertionError: expected:<Forbidden> but was:<Accepted>
      at org.junit.Assert.fail(Assert.java:88)
      at org.junit.Assert.failNotEquals(Assert.java:743)
      at org.junit.Assert.assertEquals(Assert.java:118)
      at org.junit.Assert.assertEquals(Assert.java:144)
      at org.apache.hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesAppsModification.testSingleAppKillUnauthorized(TestRMWebServicesAppsModification.java:458)

      2) Changing yarn.acl.enable from false to true results in the following errors:

      Running org.apache.hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesAppsModification
      Tests run: 10, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 49.044 sec <<< FAILURE! - in org.apache.hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesAppsModification
      testSingleAppKill[0](org.apache.hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesAppsModification) Time elapsed: 2.986 sec <<< FAILURE!
      java.lang.AssertionError: expected:<Accepted> but was:<Unauthorized>
      at org.junit.Assert.fail(Assert.java:88)
      at org.junit.Assert.failNotEquals(Assert.java:743)
      at org.junit.Assert.assertEquals(Assert.java:118)
      at org.junit.Assert.assertEquals(Assert.java:144)
      at org.apache.hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesAppsModification.testSingleAppKill(TestRMWebServicesAppsModification.java:287)

      testSingleAppKillInvalidState[0](org.apache.hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesAppsModification) Time elapsed: 2.258 sec <<< FAILURE!
      java.lang.AssertionError: expected:<Bad Request> but was:<Unauthorized>
      at org.junit.Assert.fail(Assert.java:88)
      at org.junit.Assert.failNotEquals(Assert.java:743)
      at org.junit.Assert.assertEquals(Assert.java:118)
      at org.junit.Assert.assertEquals(Assert.java:144)
      at org.apache.hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesAppsModification.testSingleAppKillInvalidState(TestRMWebServicesAppsModification.java:369)

      testSingleAppKillUnauthorized[0](org.apache.hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesAppsModification) Time elapsed: 2.263 sec <<< FAILURE!
      java.lang.AssertionError: expected:<Forbidden> but was:<Unauthorized>
      at org.junit.Assert.fail(Assert.java:88)
      at org.junit.Assert.failNotEquals(Assert.java:743)
      at org.junit.Assert.assertEquals(Assert.java:118)
      at org.junit.Assert.assertEquals(Assert.java:144)
      at org.apache.hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesAppsModification.testSingleAppKillUnauthorized(TestRMWebServicesAppsModification.java:458)

      testSingleAppKillInvalidId[0](org.apache.hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesAppsModification) Time elapsed: 0.214 sec <<< FAILURE!
      java.lang.AssertionError: expected:<Not Found> but was:<Unauthorized>
      at org.junit.Assert.fail(Assert.java:88)
      at org.junit.Assert.failNotEquals(Assert.java:743)
      at org.junit.Assert.assertEquals(Assert.java:118)
      at org.junit.Assert.assertEquals(Assert.java:144)
      at org.apache.hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesAppsModification.testSingleAppKillInvalidId(TestRMWebServicesAppsModification.java:482)

      I'm opening this JIRA as a discussion for the best way to fix this. I've got a few ideas, but I would like to get some feedback about potentially more robust ways to fix this test.

        Attachments

        1. apache-yarn-2201.0.patch
          2 kB
          Varun Vasudev
        2. apache-yarn-2201.1.patch
          2 kB
          Varun Vasudev
        3. apache-yarn-2201.2.patch
          3 kB
          Varun Vasudev
        4. apache-yarn-2201.3.patch
          6 kB
          Varun Vasudev

          Activity

            People

            • Assignee:
              vvasudev Varun Vasudev
              Reporter:
              rchiang Ray Chiang
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: