Skip to content

Commit

Permalink
YARN-8370. Some Node Manager tests fail on Windows due to improper pa…
Browse files Browse the repository at this point in the history
…th/file separator. Contributed by Anbang Hu.

(cherry picked from commit 2b2f672)
  • Loading branch information
Inigo Goiri committed Jun 12, 2018
1 parent 8814154 commit d5f3a05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ public void testGetFullDirs() throws Exception {
Assert
.assertEquals(utilizationPerc, nm.getGoodLogDirsDiskUtilizationPerc());

Assert.assertEquals(localDir2,
Assert.assertEquals(new Path(localDir2).toString(),
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));
Assert.assertEquals(localDir1 + "," + localDir2,
dirSvc.getConfig().get(YarnConfiguration.NM_LOCAL_DIRS));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public Void answer(InvocationOnMock invocationOnMock) throws Throwable {
for(int i = 0; i < tasks.length; i++) {
FileDeletionTask task = (FileDeletionTask) tasks[i];
for (Path path: task.getBaseDirs()) {
paths.add(path.toUri().getRawPath());
paths.add(new File(path.toUri().getRawPath()).getAbsolutePath());
}
}
verifyFilesToDelete(expectedPathsForDeletion, paths);
Expand Down

0 comments on commit d5f3a05

Please sign in to comment.