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

TestNodeStatusUpdater#testNMRegistration is incorrect in test case

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.4.1
    • nodemanager
    • None

    Description

      This test case passes. However, the test output log has

      java.lang.AssertionError: Number of applications should only be one! expected:<1> but was:<2>
      at org.junit.Assert.fail(Assert.java:93)
      at org.junit.Assert.failNotEquals(Assert.java:647)
      at org.junit.Assert.assertEquals(Assert.java:128)
      at org.junit.Assert.assertEquals(Assert.java:472)
      at org.apache.hadoop.yarn.server.nodemanager.TestNodeStatusUpdater$MyResourceTracker.nodeHeartbeat(TestNodeStatusUpdater.java:267)
      at org.apache.hadoop.yarn.server.nodemanager.NodeStatusUpdaterImpl$1.run(NodeStatusUpdaterImpl.java:469)
      at java.lang.Thread.run(Thread.java:695)

      TestNodeStatusUpdater.java has invalid asserts.

      } else if (heartBeatID == 3) {
      // Checks on the RM end
      Assert.assertEquals("Number of applications should only be one!", 1,
      appToContainers.size());
      Assert.assertEquals("Number of container for the app should be two!",
      2, appToContainers.get(appId2).size());

      We should fix the assert and add more check to the test.

      Attachments

        1. YARN-1750.patch
          2 kB
          Wangda Tan

        Activity

          People

            leftnoteasy Wangda Tan
            mingma Ming Ma
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: