From e7b63aebcb99f9015a0d9e86a4c5c41995c1a4ec Mon Sep 17 00:00:00 2001 From: Konstantin Shvachko Date: Sat, 24 Sep 2011 18:00:48 +0000 Subject: [PATCH] HADOOP-7663. Fix TestHDFSTrash failure. Contributed by Mayank Bansal. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1175207 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 2 ++ .../src/test/java/org/apache/hadoop/fs/TestTrash.java | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index a52d593ff32..182344d8d0a 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -1137,6 +1137,8 @@ Release 0.22.0 - Unreleased HADOOP-7568. SequenceFile should not print into stdout. (Plamen Jeliazkov via shv) + HADOOP-7663. Fix TestHDFSTrash failure. (Mayank Bansal via shv) + HADOOP-7457. Remove out-of-date Chinese language documentation. (Jakob Homan via eli) diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java index 3d739a07d8b..782e4e41674 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestTrash.java @@ -486,6 +486,9 @@ public class TestTrash extends TestCase { conf.set(FS_TRASH_INTERVAL_KEY, "0.2"); // 12 seconds conf.setClass("fs.file.impl", TestLFS.class, FileSystem.class); conf.set(FS_TRASH_CHECKPOINT_INTERVAL_KEY, "0.1"); // 6 seconds + FileSystem fs = FileSystem.getLocal(conf); + conf.set("fs.default.name", fs.getUri().toString()); + Trash trash = new Trash(conf); // Start Emptier in background @@ -493,8 +496,6 @@ public class TestTrash extends TestCase { Thread emptierThread = new Thread(emptier); emptierThread.start(); - FileSystem fs = FileSystem.getLocal(conf); - conf.set("fs.defaultFS", fs.getUri().toString()); FsShell shell = new FsShell(); shell.setConf(conf); shell.init();