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

TestNodeStatusUpdater#testNMRegistration is incorrect in test case

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

          leftnoteasy Wangda Tan added a comment -

          Working on this, assigned to me.

          leftnoteasy Wangda Tan added a comment - Working on this, assigned to me.
          leftnoteasy Wangda Tan added a comment -

          The original assertion check is not matched with expected result after running, and it's running in a separated thread so the assertion error doesn't fail test.
          Updated assertion check to expected result.

          leftnoteasy Wangda Tan added a comment - The original assertion check is not matched with expected result after running, and it's running in a separated thread so the assertion error doesn't fail test. Updated assertion check to expected result.
          hadoopqa Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12640651/YARN-1750.patch
          against trunk revision .

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 1 new or modified test files.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 javadoc. There were no new javadoc warning messages.

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed unit tests in hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-YARN-Build/3585//testReport/
          Console output: https://builds.apache.org/job/PreCommit-YARN-Build/3585//console

          This message is automatically generated.

          hadoopqa Hadoop QA added a comment - +1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12640651/YARN-1750.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-YARN-Build/3585//testReport/ Console output: https://builds.apache.org/job/PreCommit-YARN-Build/3585//console This message is automatically generated.
          junping_du Junping Du added a comment -

          Hi, wangda, thanks for your patch! I will review it soon.

          junping_du Junping Du added a comment - Hi, wangda , thanks for your patch! I will review it soon.
          junping_du Junping Du added a comment -

          +1. Patch looks good to me. Will commit it soon.

          junping_du Junping Du added a comment - +1. Patch looks good to me. Will commit it soon.
          leftnoteasy Wangda Tan added a comment - - edited

          Thanks junping_du for reviewing!

          leftnoteasy Wangda Tan added a comment - - edited Thanks junping_du for reviewing!
          junping_du Junping Du added a comment -

          Commit patch to trunk, branch-2 and branch-2.4. Thanks leftnoteasy for the patch!

          junping_du Junping Du added a comment - Commit patch to trunk, branch-2 and branch-2.4. Thanks leftnoteasy for the patch!
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-trunk-Commit #5533 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5533/)
          YARN-1750. TestNodeStatusUpdater#testNMRegistration is incorrect in test case. (Wangda Tan via junping_du) (junping_du: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1588343)

          • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
          • /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #5533 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5533/ ) YARN-1750 . TestNodeStatusUpdater#testNMRegistration is incorrect in test case. (Wangda Tan via junping_du) (junping_du: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1588343 ) /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk #544 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/544/)
          YARN-1750. TestNodeStatusUpdater#testNMRegistration is incorrect in test case. (Wangda Tan via junping_du) (junping_du: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1588343)

          • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
          • /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #544 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/544/ ) YARN-1750 . TestNodeStatusUpdater#testNMRegistration is incorrect in test case. (Wangda Tan via junping_du) (junping_du: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1588343 ) /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #1736 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1736/)
          YARN-1750. TestNodeStatusUpdater#testNMRegistration is incorrect in test case. (Wangda Tan via junping_du) (junping_du: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1588343)

          • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
          • /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #1736 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1736/ ) YARN-1750 . TestNodeStatusUpdater#testNMRegistration is incorrect in test case. (Wangda Tan via junping_du) (junping_du: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1588343 ) /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Mapreduce-trunk #1761 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1761/)
          YARN-1750. TestNodeStatusUpdater#testNMRegistration is incorrect in test case. (Wangda Tan via junping_du) (junping_du: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1588343)

          • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
          • /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk #1761 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1761/ ) YARN-1750 . TestNodeStatusUpdater#testNMRegistration is incorrect in test case. (Wangda Tan via junping_du) (junping_du: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1588343 ) /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java

          People

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

            Dates

              Created:
              Updated:
              Resolved: