YARN-8370. Some Node Manager tests fail on Windows due to improper path/file separator. Contributed by Anbang Hu.
This commit is contained in:
parent
23bfd9f7e4
commit
2b2f672022
|
@ -150,9 +150,9 @@ public class TestLocalDirsHandlerService {
|
||||||
Assert
|
Assert
|
||||||
.assertEquals(utilizationPerc, nm.getGoodLogDirsDiskUtilizationPerc());
|
.assertEquals(utilizationPerc, nm.getGoodLogDirsDiskUtilizationPerc());
|
||||||
|
|
||||||
Assert.assertEquals(localDir2,
|
Assert.assertEquals(new Path(localDir2).toString(),
|
||||||
dirSvc.getConfig().get(LocalDirsHandlerService.NM_GOOD_LOCAL_DIRS));
|
dirSvc.getConfig().get(LocalDirsHandlerService.NM_GOOD_LOCAL_DIRS));
|
||||||
Assert.assertEquals(logDir2,
|
Assert.assertEquals(new Path(logDir2).toString(),
|
||||||
dirSvc.getConfig().get(LocalDirsHandlerService.NM_GOOD_LOG_DIRS));
|
dirSvc.getConfig().get(LocalDirsHandlerService.NM_GOOD_LOG_DIRS));
|
||||||
Assert.assertEquals(localDir1 + "," + localDir2,
|
Assert.assertEquals(localDir1 + "," + localDir2,
|
||||||
dirSvc.getConfig().get(YarnConfiguration.NM_LOCAL_DIRS));
|
dirSvc.getConfig().get(YarnConfiguration.NM_LOCAL_DIRS));
|
||||||
|
|
|
@ -324,7 +324,7 @@ public class TestAppLogAggregatorImpl {
|
||||||
for(int i = 0; i < tasks.length; i++) {
|
for(int i = 0; i < tasks.length; i++) {
|
||||||
FileDeletionTask task = (FileDeletionTask) tasks[i];
|
FileDeletionTask task = (FileDeletionTask) tasks[i];
|
||||||
for (Path path: task.getBaseDirs()) {
|
for (Path path: task.getBaseDirs()) {
|
||||||
paths.add(path.toUri().getRawPath());
|
paths.add(new File(path.toUri().getRawPath()).getAbsolutePath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
verifyFilesToDelete(expectedPathsForDeletion, paths);
|
verifyFilesToDelete(expectedPathsForDeletion, paths);
|
||||||
|
|
Loading…
Reference in New Issue