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 b283c16d58e..ca2c58b411b 100755 --- 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 @@ -171,7 +171,7 @@ public class TestLeaseRecovery2 { // set the soft limit to be 1 hour but recoverLease should // close the file immediately cluster.setLeasePeriod(LONG_LEASE_PERIOD, LONG_LEASE_PERIOD); - int size = AppendTestUtil.nextInt(FILE_SIZE); + int size = AppendTestUtil.nextInt((int) BLOCK_SIZE); String filestr = "/testCloseWhileRecoverLease"; AppendTestUtil.LOG.info("filestr=" + filestr);