Author: tgraves Date: Fri Aug 17 15:21:48 2012 New Revision: 1374316 URL: http://svn.apache.org/viewvc?rev=1374316&view=rev Log: merge -r 1374312:1374313 from branch-2. FIXES: HADOOP-8692
Modified: hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalDirAllocator.java Modified: hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1374316&r1=1374315&r2=1374316&view=diff ============================================================================== --- hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt (original) +++ hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt Fri Aug 17 15:21:48 2012 @@ -159,6 +159,9 @@ Release 0.23.3 - UNRELEASED HADOOP-8390. TestFileSystemCanonicalization fails with JDK7 (Trevor Robinson via tgraves) + HADOOP-8692. TestLocalDirAllocator fails intermittently with JDK7 + (Trevor Robinson via tgraves) + Release 0.23.2 - UNRELEASED NEW FEATURES Modified: hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalDirAllocator.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalDirAllocator.java?rev=1374316&r1=1374315&r2=1374316&view=diff ============================================================================== --- hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalDirAllocator.java (original) +++ hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalDirAllocator.java Fri Aug 17 15:21:48 2012 @@ -340,14 +340,18 @@ public class TestLocalDirAllocator { @Test public void testRemoveContext() throws IOException { String dir = buildBufferDir(ROOT, 0); - String contextCfgItemName = "application_1340842292563_0004.app.cache.dirs"; - conf.set(contextCfgItemName, dir); - LocalDirAllocator localDirAllocator = new LocalDirAllocator( - contextCfgItemName); - localDirAllocator.getLocalPathForWrite("p1/x", SMALL_FILE_SIZE, conf); - assertTrue(LocalDirAllocator.isContextValid(contextCfgItemName)); - LocalDirAllocator.removeContext(contextCfgItemName); - assertFalse(LocalDirAllocator.isContextValid(contextCfgItemName)); + try { + String contextCfgItemName = "application_1340842292563_0004.app.cache.dirs"; + conf.set(contextCfgItemName, dir); + LocalDirAllocator localDirAllocator = new LocalDirAllocator( + contextCfgItemName); + localDirAllocator.getLocalPathForWrite("p1/x", SMALL_FILE_SIZE, conf); + assertTrue(LocalDirAllocator.isContextValid(contextCfgItemName)); + LocalDirAllocator.removeContext(contextCfgItemName); + assertFalse(LocalDirAllocator.isContextValid(contextCfgItemName)); + } finally { + rmBufferDirs(); + } } }