|
@@ -44,9 +44,7 @@ import org.apache.hadoop.yarn.util.Records;
|
|
import org.junit.After;
|
|
import org.junit.After;
|
|
import org.junit.Assert;
|
|
import org.junit.Assert;
|
|
import org.junit.Before;
|
|
import org.junit.Before;
|
|
-import org.junit.Rule;
|
|
|
|
import org.junit.Test;
|
|
import org.junit.Test;
|
|
-import org.junit.rules.Timeout;
|
|
|
|
|
|
|
|
public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
private YarnClient client = null;
|
|
private YarnClient client = null;
|
|
@@ -65,10 +63,7 @@ public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- @Rule
|
|
|
|
- public Timeout timeout = new Timeout(180000);
|
|
|
|
-
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testGetApplicationReportOnHA() throws Exception {
|
|
public void testGetApplicationReportOnHA() throws Exception {
|
|
ApplicationReport report =
|
|
ApplicationReport report =
|
|
client.getApplicationReport(cluster.createFakeAppId());
|
|
client.getApplicationReport(cluster.createFakeAppId());
|
|
@@ -76,7 +71,7 @@ public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
Assert.assertEquals(cluster.createFakeAppReport(), report);
|
|
Assert.assertEquals(cluster.createFakeAppReport(), report);
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testGetNewApplicationOnHA() throws Exception {
|
|
public void testGetNewApplicationOnHA() throws Exception {
|
|
ApplicationId appId =
|
|
ApplicationId appId =
|
|
client.createApplication().getApplicationSubmissionContext()
|
|
client.createApplication().getApplicationSubmissionContext()
|
|
@@ -85,7 +80,7 @@ public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
Assert.assertEquals(cluster.createFakeAppId(), appId);
|
|
Assert.assertEquals(cluster.createFakeAppId(), appId);
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testGetClusterMetricsOnHA() throws Exception {
|
|
public void testGetClusterMetricsOnHA() throws Exception {
|
|
YarnClusterMetrics clusterMetrics =
|
|
YarnClusterMetrics clusterMetrics =
|
|
client.getYarnClusterMetrics();
|
|
client.getYarnClusterMetrics();
|
|
@@ -94,7 +89,7 @@ public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
clusterMetrics);
|
|
clusterMetrics);
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testGetApplicationsOnHA() throws Exception {
|
|
public void testGetApplicationsOnHA() throws Exception {
|
|
List<ApplicationReport> reports =
|
|
List<ApplicationReport> reports =
|
|
client.getApplications();
|
|
client.getApplications();
|
|
@@ -104,7 +99,7 @@ public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
reports);
|
|
reports);
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testGetClusterNodesOnHA() throws Exception {
|
|
public void testGetClusterNodesOnHA() throws Exception {
|
|
List<NodeReport> reports = client.getNodeReports(NodeState.RUNNING);
|
|
List<NodeReport> reports = client.getNodeReports(NodeState.RUNNING);
|
|
Assert.assertTrue(reports != null);
|
|
Assert.assertTrue(reports != null);
|
|
@@ -113,7 +108,7 @@ public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
reports);
|
|
reports);
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testGetQueueInfoOnHA() throws Exception {
|
|
public void testGetQueueInfoOnHA() throws Exception {
|
|
QueueInfo queueInfo = client.getQueueInfo("root");
|
|
QueueInfo queueInfo = client.getQueueInfo("root");
|
|
Assert.assertTrue(queueInfo != null);
|
|
Assert.assertTrue(queueInfo != null);
|
|
@@ -121,7 +116,7 @@ public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
queueInfo);
|
|
queueInfo);
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testGetQueueUserAclsOnHA() throws Exception {
|
|
public void testGetQueueUserAclsOnHA() throws Exception {
|
|
List<QueueUserACLInfo> queueUserAclsList = client.getQueueAclsInfo();
|
|
List<QueueUserACLInfo> queueUserAclsList = client.getQueueAclsInfo();
|
|
Assert.assertTrue(queueUserAclsList != null);
|
|
Assert.assertTrue(queueUserAclsList != null);
|
|
@@ -130,7 +125,7 @@ public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
queueUserAclsList);
|
|
queueUserAclsList);
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testGetApplicationAttemptReportOnHA() throws Exception {
|
|
public void testGetApplicationAttemptReportOnHA() throws Exception {
|
|
ApplicationAttemptReport report =
|
|
ApplicationAttemptReport report =
|
|
client.getApplicationAttemptReport(cluster
|
|
client.getApplicationAttemptReport(cluster
|
|
@@ -139,7 +134,7 @@ public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
Assert.assertEquals(cluster.createFakeApplicationAttemptReport(), report);
|
|
Assert.assertEquals(cluster.createFakeApplicationAttemptReport(), report);
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testGetApplicationAttemptsOnHA() throws Exception {
|
|
public void testGetApplicationAttemptsOnHA() throws Exception {
|
|
List<ApplicationAttemptReport> reports =
|
|
List<ApplicationAttemptReport> reports =
|
|
client.getApplicationAttempts(cluster.createFakeAppId());
|
|
client.getApplicationAttempts(cluster.createFakeAppId());
|
|
@@ -149,7 +144,7 @@ public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
reports);
|
|
reports);
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testGetContainerReportOnHA() throws Exception {
|
|
public void testGetContainerReportOnHA() throws Exception {
|
|
ContainerReport report =
|
|
ContainerReport report =
|
|
client.getContainerReport(cluster.createFakeContainerId());
|
|
client.getContainerReport(cluster.createFakeContainerId());
|
|
@@ -157,7 +152,7 @@ public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
Assert.assertEquals(cluster.createFakeContainerReport(), report);
|
|
Assert.assertEquals(cluster.createFakeContainerReport(), report);
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testGetContainersOnHA() throws Exception {
|
|
public void testGetContainersOnHA() throws Exception {
|
|
List<ContainerReport> reports =
|
|
List<ContainerReport> reports =
|
|
client.getContainers(cluster.createFakeApplicationAttemptId());
|
|
client.getContainers(cluster.createFakeApplicationAttemptId());
|
|
@@ -167,7 +162,7 @@ public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
reports);
|
|
reports);
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testSubmitApplicationOnHA() throws Exception {
|
|
public void testSubmitApplicationOnHA() throws Exception {
|
|
ApplicationSubmissionContext appContext =
|
|
ApplicationSubmissionContext appContext =
|
|
Records.newRecord(ApplicationSubmissionContext.class);
|
|
Records.newRecord(ApplicationSubmissionContext.class);
|
|
@@ -184,23 +179,23 @@ public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
.containsKey(appId));
|
|
.containsKey(appId));
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testMoveApplicationAcrossQueuesOnHA() throws Exception{
|
|
public void testMoveApplicationAcrossQueuesOnHA() throws Exception{
|
|
client.moveApplicationAcrossQueues(cluster.createFakeAppId(), "root");
|
|
client.moveApplicationAcrossQueues(cluster.createFakeAppId(), "root");
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testForceKillApplicationOnHA() throws Exception {
|
|
public void testForceKillApplicationOnHA() throws Exception {
|
|
client.killApplication(cluster.createFakeAppId());
|
|
client.killApplication(cluster.createFakeAppId());
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testGetDelegationTokenOnHA() throws Exception {
|
|
public void testGetDelegationTokenOnHA() throws Exception {
|
|
Token token = client.getRMDelegationToken(new Text(" "));
|
|
Token token = client.getRMDelegationToken(new Text(" "));
|
|
Assert.assertEquals(token, cluster.createFakeToken());
|
|
Assert.assertEquals(token, cluster.createFakeToken());
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testRenewDelegationTokenOnHA() throws Exception {
|
|
public void testRenewDelegationTokenOnHA() throws Exception {
|
|
RenewDelegationTokenRequest request =
|
|
RenewDelegationTokenRequest request =
|
|
RenewDelegationTokenRequest.newInstance(cluster.createFakeToken());
|
|
RenewDelegationTokenRequest.newInstance(cluster.createFakeToken());
|
|
@@ -210,7 +205,7 @@ public class TestApplicationClientProtocolOnHA extends ProtocolHATestBase {
|
|
Assert.assertEquals(newExpirationTime, cluster.createNextExpirationTime());
|
|
Assert.assertEquals(newExpirationTime, cluster.createNextExpirationTime());
|
|
}
|
|
}
|
|
|
|
|
|
- @Test
|
|
|
|
|
|
+ @Test(timeout = 15000)
|
|
public void testCancelDelegationTokenOnHA() throws Exception {
|
|
public void testCancelDelegationTokenOnHA() throws Exception {
|
|
CancelDelegationTokenRequest request =
|
|
CancelDelegationTokenRequest request =
|
|
CancelDelegationTokenRequest.newInstance(cluster.createFakeToken());
|
|
CancelDelegationTokenRequest.newInstance(cluster.createFakeToken());
|