From 4f1a0e36fab1f18e6e2c5fcc72cd9a7634967fcd Mon Sep 17 00:00:00 2001 From: Konstantin Shvachko Date: Wed, 31 Aug 2011 21:18:37 +0000 Subject: [PATCH] HDFS-2258. Reset lease limits to default values in TestLeaseRecovery2. Contributed by Konstantin Shvachko git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1163821 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ .../test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index aa75b5ecb8..56389620a8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1548,6 +1548,8 @@ Release 0.22.0 - Unreleased HDFS-1981. NameNode does not saveNamespace() when editsNew is empty. (Uma Maheswara Rao G via shv) + HDFS-2258. Reset lease limits to default values in TestLeaseRecovery2. (shv) + Release 0.21.1 - Unreleased HDFS-1466. TestFcHdfsSymlink relies on /tmp/test not existing. (eli) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java index 1d3dd5206a..8e720fd172 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java @@ -36,6 +36,7 @@ import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException; +import org.apache.hadoop.hdfs.protocol.FSConstants; import org.apache.hadoop.hdfs.protocol.LocatedBlocks; import org.apache.hadoop.hdfs.server.common.HdfsConstants; import org.apache.hadoop.hdfs.server.datanode.DataNode; @@ -316,6 +317,9 @@ public void testSoftLeaseRecovery() throws Exception { u2g_map.put(fakeUsername, new String[] {fakeGroup}); DFSTestUtil.updateConfWithFakeGroupMapping(conf, u2g_map); + // Reset default lease periods + cluster.setLeasePeriod(FSConstants.LEASE_SOFTLIMIT_PERIOD, + FSConstants.LEASE_HARDLIMIT_PERIOD); //create a file // create a random file name String filestr = "/foo" + AppendTestUtil.nextInt();