[
https://issues.apache.org/jira/browse/YARN-5024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15270923#comment-15270923
]
Yufei Gu commented on YARN-5024:
--------------------------------
Hi [~bibinchundatt] and [~rohithsharma], I agreed. If you find other test cases
have the same root causes in YARN-4929, better to solve them as well and
comment in YARN-4929. So next time people will focus on other tests in
YARN-4929. But no need to bock this one.
Other than that, MockRM has these methods for waiting for a state of a
container. A new wait function may be not necessary. Even for multiple
containers, you can still reuse them.
/**
* Wait until a container has reached a specified state.
* The timeout is 10 seconds.
* @param nm A mock nodemanager
* @param containerId the id of a container
* @param containerState the container state waited
* @return if reach the state before timeout; false otherwise.
* @throws Exception
* if interrupted while waiting for the state transition
* or an unexpected error while MockNM is hearbeating.
*/
public boolean waitForState(MockNM nm, ContainerId containerId,
RMContainerState containerState) throws Exception {
return waitForState(nm, containerId, containerState,
TIMEOUT_MS_FOR_CONTAINER_AND_NODE);
}
/**
* Wait until a container has reached a specified state.
* The timeout is specified by the parameter.
* @param nm A mock nodemanager
* @param containerId the id of a container
* @param containerState the container state waited
* @param timeoutMsecs the length of timeout in milliseconds
* @return if reach the state before timeout; false otherwise.
* @throws Exception
* if interrupted while waiting for the state transition
* or an unexpected error while MockNM is hearbeating.
*/
public boolean waitForState(MockNM nm, ContainerId containerId,
RMContainerState containerState, int timeoutMsecs) throws Exception {
return waitForState(Arrays.asList(nm), containerId, containerState,
timeoutMsecs);
}
> TestContainerResourceUsage#testUsageAfterAMRestartWithMultipleContainers
> random failure
> ---------------------------------------------------------------------------------------
>
> Key: YARN-5024
> URL: https://issues.apache.org/jira/browse/YARN-5024
> Project: Hadoop YARN
> Issue Type: Test
> Reporter: Bibin A Chundatt
> Assignee: Bibin A Chundatt
> Attachments: 0001-YARN-5024.patch, 0002-YARN-5024.patch,
> 0003-YARN-5024.patch
>
>
> Random Testcase failure for
> {{TestContainerResourceUsage#testUsageAfterAMRestartWithMultipleContainers}}
> {noformat}
> java.lang.AssertionError: Unexcpected MemorySeconds value
> expected:<-1497214794931> but was:<1913>
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.failNotEquals(Assert.java:743)
> at org.junit.Assert.assertEquals(Assert.java:118)
> at org.junit.Assert.assertEquals(Assert.java:555)
> at
> org.apache.hadoop.yarn.server.resourcemanager.TestContainerResourceUsage.amRestartTests(TestContainerResourceUsage.java:395)
> at
> org.apache.hadoop.yarn.server.resourcemanager.TestContainerResourceUsage.testUsageAfterAMRestartWithMultipleContainers(TestContainerResourceUsage.java:252)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at
> org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]