diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index dbb8309024..4d6cca078c 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -916,6 +916,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 INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalDirAllocator.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalDirAllocator.java index 51e57dba81..3b76a56feb 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalDirAllocator.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalDirAllocator.java @@ -343,14 +343,18 @@ public void testGetLocalPathToRead() throws IOException { @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(); + } } }