YARN-11621: Fix intermittently failing unit test: TestAMRMProxy.testAMRMProxyTokenRenewal (#6310)
This commit is contained in:
parent
1fb80ef787
commit
78d5fe24d6
@ -156,13 +156,13 @@ public void testAMRMProxyTokenRenewal() throws Exception {
|
|||||||
YarnClient rmClient = YarnClient.createYarnClient()) {
|
YarnClient rmClient = YarnClient.createYarnClient()) {
|
||||||
Configuration conf = new YarnConfiguration();
|
Configuration conf = new YarnConfiguration();
|
||||||
conf.setBoolean(YarnConfiguration.AMRM_PROXY_ENABLED, true);
|
conf.setBoolean(YarnConfiguration.AMRM_PROXY_ENABLED, true);
|
||||||
conf.setInt(YarnConfiguration.RM_NM_EXPIRY_INTERVAL_MS, 4500);
|
conf.setInt(YarnConfiguration.RM_NM_EXPIRY_INTERVAL_MS, 8000);
|
||||||
conf.setInt(YarnConfiguration.RM_NM_HEARTBEAT_INTERVAL_MS, 4500);
|
conf.setInt(YarnConfiguration.RM_NM_HEARTBEAT_INTERVAL_MS, 8000);
|
||||||
conf.setInt(YarnConfiguration.RM_AM_EXPIRY_INTERVAL_MS, 4500);
|
conf.setInt(YarnConfiguration.RM_AM_EXPIRY_INTERVAL_MS, 12000);
|
||||||
// RM_AMRM_TOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS should be at least
|
// RM_AMRM_TOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS should be at least
|
||||||
// RM_AM_EXPIRY_INTERVAL_MS * 1.5 *3
|
// RM_AM_EXPIRY_INTERVAL_MS * 1.5 *3
|
||||||
conf.setInt(
|
conf.setInt(
|
||||||
YarnConfiguration.RM_AMRM_TOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS, 20);
|
YarnConfiguration.RM_AMRM_TOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS, 37);
|
||||||
cluster.init(conf);
|
cluster.init(conf);
|
||||||
cluster.start();
|
cluster.start();
|
||||||
final Configuration yarnConf = cluster.getConfig();
|
final Configuration yarnConf = cluster.getConfig();
|
||||||
@ -203,7 +203,7 @@ public void testAMRMProxyTokenRenewal() throws Exception {
|
|||||||
lastToken = response.getAMRMToken();
|
lastToken = response.getAMRMToken();
|
||||||
|
|
||||||
// Time slot to be sure the AMRMProxy renew the token
|
// Time slot to be sure the AMRMProxy renew the token
|
||||||
Thread.sleep(4500);
|
Thread.sleep(9000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user