hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rohith (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (YARN-1854) Race condition in TestRMHA#testStartAndTransitions
Date Wed, 26 Mar 2014 03:19:19 GMT

     [ https://issues.apache.org/jira/browse/YARN-1854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rohith updated YARN-1854:
-------------------------

    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.




{noformat}
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>
{noformat}

  was:
{noformat}
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>
{noformat}

        Summary: Race condition in TestRMHA#testStartAndTransitions  (was: TestRMHA#testStartAndTransitions
Fails)

I updated issue description as per fix.

> Race condition in TestRMHA#testStartAndTransitions
> --------------------------------------------------
>
>                 Key: YARN-1854
>                 URL: https://issues.apache.org/jira/browse/YARN-1854
>             Project: Hadoop YARN
>          Issue Type: Test
>    Affects Versions: 2.4.0
>            Reporter: Mit Desai
>            Assignee: Rohith
>            Priority: Blocker
>             Fix For: 2.4.0
>
>         Attachments: Log.rtf, YARN-1854.1.patch, YARN-1854.patch
>
>
> 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.
> {noformat}
> 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>
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message