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

Race condition in TestRMHA#testStartAndTransitions

    XMLWordPrintableJSON

    Details

    • Type: Test
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.4.0
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      There is race in test.
      TestRMHA#testStartAndTransitions calls verifyClusterMetrics() immediately after application is submitted, but QueueMetrics are updated after app attempt is sheduled. Calling verifyClusterMetrics() without verifying app attempt is in Scheduled state cause random test failures.
      MockRM.submitApp() return when application is in ACCEPTED, but QueueMetrics updated at APP_ATTEMPT_ADDED event. There is high chance of getting queue metrics before app attempt is Scheduled.

      testStartAndTransitions(org.apache.hadoop.yarn.server.resourcemanager.TestRMHA)  Time elapsed: 5.883 sec  <<< FAILURE!
      java.lang.AssertionError: Incorrect value for metric availableMB expected:<2048> but was:<4096>
      	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.resourcemanager.TestRMHA.assertMetric(TestRMHA.java:396)
      	at org.apache.hadoop.yarn.server.resourcemanager.TestRMHA.verifyClusterMetrics(TestRMHA.java:387)
      	at org.apache.hadoop.yarn.server.resourcemanager.TestRMHA.testStartAndTransitions(TestRMHA.java:160)
      
      
      Results :
      
      Failed tests: 
        TestRMHA.testStartAndTransitions:160->verifyClusterMetrics:387->assertMetric:396 Incorrect value for metric availableMB expected:<2048> but was:<4096>
      

        Attachments

        1. Log.rtf
          82 kB
          Mit Desai
        2. YARN-1854.1.patch
          4 kB
          Rohith Sharma K S
        3. YARN-1854.patch
          2 kB
          Rohith Sharma K S

          Issue Links

            Activity

              People

              • Assignee:
                rohithsharma Rohith Sharma K S
                Reporter:
                mitdesai Mit Desai
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: