From e576bac2f7fe0452007a394f3909507d17eaa6b3 Mon Sep 17 00:00:00 2001 From: Harsh J Date: Tue, 29 May 2012 14:12:17 +0000 Subject: [PATCH] HADOOP-8444. Fix the tests FSMainOperationsBaseTest.java and FileContextMainOperationsBaseTest.java to avoid potential test failure. Contributed by Madhukara Phatak. (harsh) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1343732 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 4 ++++ .../java/org/apache/hadoop/fs/FSMainOperationsBaseTest.java | 2 +- .../apache/hadoop/fs/FileContextMainOperationsBaseTest.java | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index f39cb69c7f..2d3a41690d 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -215,6 +215,10 @@ Release 2.0.1-alpha - UNRELEASED HADOOP-8268. A few pom.xml across Hadoop project may fail XML validation. (Radim Kolar via harsh) + HADOOP-8444. Fix the tests FSMainOperationsBaseTest.java and + FileContextMainOperationsBaseTest.java to avoid potential + test failure (Madhukara Phatak via harsh) + Release 2.0.0-alpha - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FSMainOperationsBaseTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FSMainOperationsBaseTest.java index 6b3963b41a..f51884627e 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FSMainOperationsBaseTest.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FSMainOperationsBaseTest.java @@ -75,7 +75,7 @@ public boolean accept(final Path file) { //A test filter with returns any path containing a "b" final private static PathFilter TEST_X_FILTER = new PathFilter() { public boolean accept(Path file) { - if(file.getName().contains("x") || file.toString().contains("X")) + if(file.getName().contains("x") || file.getName().contains("X")) return true; else return false; diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java index b88f5b5c5d..373cebd9be 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java @@ -75,7 +75,7 @@ public boolean accept(final Path file) { //A test filter with returns any path containing a "b" final private static PathFilter TEST_X_FILTER = new PathFilter() { public boolean accept(Path file) { - if(file.getName().contains("x") || file.toString().contains("X")) + if(file.getName().contains("x") || file.getName().contains("X")) return true; else return false;