merge -r 1374311:1374312 from trunk. FIXES: HADOOP-8692
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1374313 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aa9bf3b472
commit
cf57897b96
|
@ -736,6 +736,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
|
||||
|
|
|
@ -343,14 +343,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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue