|
@@ -422,6 +422,11 @@ public class TestPipelinesFailover {
|
|
// Disable permissions so that another user can recover the lease.
|
|
// Disable permissions so that another user can recover the lease.
|
|
harness.conf.setBoolean(
|
|
harness.conf.setBoolean(
|
|
DFSConfigKeys.DFS_PERMISSIONS_ENABLED_KEY, false);
|
|
DFSConfigKeys.DFS_PERMISSIONS_ENABLED_KEY, false);
|
|
|
|
+ // This test triggers rapid NN failovers. The client retry policy uses an
|
|
|
|
+ // exponential backoff. This can quickly lead to long sleep times and even
|
|
|
|
+ // timeout the whole test. Cap the sleep time at 1s to prevent this.
|
|
|
|
+ harness.conf.setInt(DFSConfigKeys.DFS_CLIENT_FAILOVER_SLEEPTIME_MAX_KEY,
|
|
|
|
+ 1000);
|
|
|
|
|
|
final MiniDFSCluster cluster = harness.startCluster();
|
|
final MiniDFSCluster cluster = harness.startCluster();
|
|
try {
|
|
try {
|
|
@@ -537,11 +542,10 @@ public class TestPipelinesFailover {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Try to cover the lease on the given file for up to 30
|
|
|
|
- * seconds.
|
|
|
|
|
|
+ * Try to recover the lease on the given file for up to 60 seconds.
|
|
* @param fsOtherUser the filesystem to use for the recoverLease call
|
|
* @param fsOtherUser the filesystem to use for the recoverLease call
|
|
* @param testPath the path on which to run lease recovery
|
|
* @param testPath the path on which to run lease recovery
|
|
- * @throws TimeoutException if lease recover does not succeed within 30
|
|
|
|
|
|
+ * @throws TimeoutException if lease recover does not succeed within 60
|
|
* seconds
|
|
* seconds
|
|
* @throws InterruptedException if the thread is interrupted
|
|
* @throws InterruptedException if the thread is interrupted
|
|
*/
|
|
*/
|
|
@@ -564,7 +568,7 @@ public class TestPipelinesFailover {
|
|
}
|
|
}
|
|
return success;
|
|
return success;
|
|
}
|
|
}
|
|
- }, 1000, 30000);
|
|
|
|
|
|
+ }, 1000, 60000);
|
|
} catch (TimeoutException e) {
|
|
} catch (TimeoutException e) {
|
|
throw new TimeoutException("Timed out recovering lease for " +
|
|
throw new TimeoutException("Timed out recovering lease for " +
|
|
testPath);
|
|
testPath);
|