[ 
https://issues.apache.org/jira/browse/YARN-1854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13942760#comment-13942760
 ] 

Rohith commented on YARN-1854:
------------------------------

Thank you [~vinodkv] for going through patch.

I agree that Karthik's solution is good:-)

bq. The solution in the patch will work, but there are cases where we are 
inspecting decrease of a counter too. And there, we will need to wait till 
scheduler seems the change
Correct me if am wrong, I think we need not wait here because in test 
checkStandbyRMFunctionality method verify RM is in STANDBY state.It means all 
queue metrics and cluster metrics must have reset to 0(zero).
Similarly, for verifying incremented metrics, wait for applicationattempt in 
SCHEDULED state must have proper metrics.


> TestRMHA#testStartAndTransitions Fails
> --------------------------------------
>
>                 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
>         Attachments: YARN-1854.patch
>
>
> {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)

Reply via email to