From 91a4da5ebbfafc746c757250e27047ab526de369 Mon Sep 17 00:00:00 2001 From: Bikas Saha Date: Thu, 6 Jun 2013 20:47:09 +0000 Subject: [PATCH] YARN-761. TestNMClientAsync fails sometimes (Zhijie Shen via bikas) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1490437 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-yarn-project/CHANGES.txt | 5 +++++ .../org/apache/hadoop/yarn/client/TestNMClientAsync.java | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index f407e3bb6a..5335436d4a 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -274,6 +274,9 @@ Release 2.1.0-beta - UNRELEASED YARN-756. Move Preemption* records to yarn.api where they really belong. (Jian He via vinodkv) + YARN-750. Allow for black-listing resources in YARN API and Impl in CS + (acmurthy via bikas) + OPTIMIZATIONS YARN-512. Log aggregation root directory check is more expensive than it @@ -445,6 +448,8 @@ Release 2.1.0-beta - UNRELEASED YARN-764. blank Used Resources on Capacity Scheduler page (Nemon Lou via tgraves) + YARN-761. TestNMClientAsync fails sometimes (Zhijie Shen via bikas) + BREAKDOWN OF HADOOP-8562 SUBTASKS AND RELATED JIRAS YARN-158. Yarn creating package-info.java must not depend on sh. diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/TestNMClientAsync.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/TestNMClientAsync.java index cec7a819b6..6fff279727 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/TestNMClientAsync.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/TestNMClientAsync.java @@ -121,8 +121,11 @@ public void testNMClientAsync() throws Exception { } Assert.assertEquals("Error occurs in ContainerEventProcessor", 0, ((MockNMClientAsync1) asyncClient).errorMsgs.size()); - Assert.assertEquals("Completed container is not removed", 0, - asyncClient.containers.size()); + // When the callback functions are all executed, the event processor threads + // may still not terminate and the containers may still not removed. + while (asyncClient.containers.size() > 0) { + Thread.sleep(10); + } asyncClient.stop(); Assert.assertFalse( "The thread of Container Management Event Dispatcher is still alive",