From ca121a78fd6464a67d60c1fe14eea7109bdaf899 Mon Sep 17 00:00:00 2001 From: Tsuyoshi Ozawa Date: Sun, 21 Dec 2014 12:47:28 +0900 Subject: [PATCH] Revert "YARN-2977. Fixed intermittent TestNMClient failure. (Contributed by Junping Du)" This reverts commit d79f63120e16cb03f3f85b5d79a84202881a95a5. --- .../hadoop/yarn/client/api/impl/TestNMClient.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestNMClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestNMClient.java index 0d4a2714f82..88dbf81d2af 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestNMClient.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestNMClient.java @@ -344,11 +344,10 @@ public class TestNMClient { // getContainerStatus can be called after stopContainer try { // O is possible if CLEANUP_CONTAINER is executed too late - // -105 is possible if the container is not terminated but killed + // 137 is possible if the container is not terminated but killed testGetContainerStatus(container, i, ContainerState.COMPLETE, "Container killed by the ApplicationMaster.", Arrays.asList( - new Integer[] {ContainerExitStatus.KILLED_BY_APPMASTER, - ContainerExitStatus.SUCCESS})); + new Integer[] {ContainerExitStatus.KILLED_BY_APPMASTER})); } catch (YarnException e) { // The exception is possible because, after the container is stopped, // it may be removed from NM's context. @@ -384,10 +383,7 @@ public class TestNMClient { assertEquals(container.getId(), status.getContainerId()); assertTrue("" + index + ": " + status.getDiagnostics(), status.getDiagnostics().contains(diagnostics)); - - assertTrue("Exit Statuses are supposed to be in: " + exitStatuses + - ", but the actual exit status code is: " + status.getExitStatus(), - exitStatuses.contains(status.getExitStatus())); + assertTrue(exitStatuses.contains(status.getExitStatus())); break; } Thread.sleep(100);