Browse Source

HDFS-14004. TestLeaseRecovery2#testCloseWhileRecoverLease fails intermittently in trunk. Contributed by Ayush Saxena.

(cherry picked from commit efdfe679d64ce9de4ba6aaf2afa34e180f68d969)
(cherry picked from commit 7d64d44515045bb3dedd91a4a0351bc5a6178a14)
Inigo Goiri 6 years ago
parent
commit
3938aa422e

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java

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