From d15fb57f4674b70cbeb322eb5eaa988e6e266f85 Mon Sep 17 00:00:00 2001 From: arp Date: Fri, 12 Dec 2014 14:28:46 -0800 Subject: [PATCH] HDFS-7514. TestTextCommand fails on Windows. (Arpit Agarwal) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ ...{TestTextCommand.java => TestHdfsTextCommand.java} | 11 ++++------- 2 files changed, 6 insertions(+), 7 deletions(-) rename hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/shell/{TestTextCommand.java => TestHdfsTextCommand.java} (98%) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index f0e0c62ccb5..c7b72eb7615 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -325,6 +325,8 @@ Release 2.7.0 - UNRELEASED HDFS-7517. Remove redundant non-null checks in FSNamesystem# getBlockLocations. (wheat9) + HDFS-7514. TestTextCommand fails on Windows. (Arpit Agarwal) + Release 2.6.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/shell/TestTextCommand.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/shell/TestHdfsTextCommand.java similarity index 98% rename from hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/shell/TestTextCommand.java rename to hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/shell/TestHdfsTextCommand.java index 49da6e137f4..b20040d9cec 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/shell/TestTextCommand.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/shell/TestHdfsTextCommand.java @@ -42,13 +42,12 @@ * This class tests the logic for displaying the binary formats supported * by the Text command. */ -public class TestTextCommand { - private static final String TEST_ROOT_DIR = - System.getProperty("test.build.data", "build/test/data/") + "/testText"; +public class TestHdfsTextCommand { + private static final String TEST_ROOT_DIR = "/build/test/data/testText"; private static final Path AVRO_FILENAME = new Path(TEST_ROOT_DIR, "weather.avro"); private static MiniDFSCluster cluster; private static FileSystem fs; - + @Before public void setUp() throws IOException{ Configuration conf = new HdfsConfiguration(); @@ -66,7 +65,7 @@ public void tearDown() throws IOException{ cluster.shutdown(); } } - + /** * Tests whether binary Avro data files are displayed correctly. */ @@ -214,5 +213,3 @@ private byte[] generateWeatherAvroBinaryData() { return contents; } } - -