From d9de6a928df055647fa3c6138f3b9142a4f6c0b0 Mon Sep 17 00:00:00 2001 From: Chris Nauroth Date: Fri, 16 Aug 2013 04:38:03 +0000 Subject: [PATCH] HDFS-5103. TestDirectoryScanner fails on Windows. Contributed by Chuan Liu. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1514576 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ .../hadoop/hdfs/server/datanode/TestDirectoryScanner.java | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 3ea6bbb88b4..44959ef4ffb 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -348,6 +348,8 @@ Release 2.1.1-beta - UNRELEASED HDFS-5100. TestNamenodeRetryCache fails on Windows due to incorrect cleanup. (Chuan Liu via cnauroth) + HDFS-5103. TestDirectoryScanner fails on Windows. (Chuan Liu via cnauroth) + Release 2.1.0-beta - 2013-08-22 INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDirectoryScanner.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDirectoryScanner.java index 579ffe82f13..c5decf2eaa6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDirectoryScanner.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDirectoryScanner.java @@ -394,12 +394,12 @@ public class TestDirectoryScanner { @Override public String getBasePath() { - return "/base"; + return (new File("/base")).getAbsolutePath(); } @Override public String getPath(String bpid) throws IOException { - return "/base/current/" + bpid; + return (new File("/base/current/" + bpid)).getAbsolutePath(); } @Override @@ -416,8 +416,6 @@ public class TestDirectoryScanner { void testScanInfoObject(long blockId, File blockFile, File metaFile) throws Exception { - assertEquals("/base/current/" + BPID_1 + "/finalized", - TEST_VOLUME.getFinalizedDir(BPID_1).getAbsolutePath()); DirectoryScanner.ScanInfo scanInfo = new DirectoryScanner.ScanInfo(blockId, blockFile, metaFile, TEST_VOLUME); assertEquals(blockId, scanInfo.getBlockId());