fix unit test
This commit is contained in:
parent
5648a14827
commit
2fc1d60e8b
|
@ -162,7 +162,7 @@ public class TestQueueMetrics {
|
|||
.counter(APPS_SUBMITTED, 1)
|
||||
.gaugeInt(APPS_RUNNING, 0)
|
||||
.checkAgainst(queueSource, true);
|
||||
metrics.finishApp(USER, RMAppState.FINISHED, FinalApplicationStatus.FAILED, false);
|
||||
metrics.finishApp(USER, RMAppState.FINISHED, FinalApplicationStatus.SUCCEEDED, false);
|
||||
AppMetricsChecker.createFromChecker(appMetricsChecker)
|
||||
.counter(APPS_COMPLETED, 1)
|
||||
.checkAgainst(queueSource, true);
|
||||
|
@ -446,7 +446,7 @@ public class TestQueueMetrics {
|
|||
AppMetricsChecker.createFromChecker(appMetricsUserSourceChecker)
|
||||
.gaugeInt(APPS_RUNNING, 0)
|
||||
.checkAgainst(userSource, true);
|
||||
metrics.finishApp(USER_2, RMAppState.FINISHED, FinalApplicationStatus.FAILED, false);
|
||||
metrics.finishApp(USER_2, RMAppState.FINISHED, FinalApplicationStatus.SUCCEEDED, false);
|
||||
AppMetricsChecker.createFromChecker(appMetricsQueueSourceChecker)
|
||||
.counter(APPS_COMPLETED, 1)
|
||||
.checkAgainst(queueSource, true);
|
||||
|
@ -715,7 +715,7 @@ public class TestQueueMetrics {
|
|||
.gaugeInt(APPS_RUNNING, 0)
|
||||
.checkAgainst(root.userSource, true);
|
||||
|
||||
leaf.queueMetrics.finishApp(USER, RMAppState.FINISHED, FinalApplicationStatus.FAILED, false);
|
||||
leaf.queueMetrics.finishApp(USER, RMAppState.FINISHED, FinalApplicationStatus.SUCCEEDED, false);
|
||||
AppMetricsChecker.createFromChecker(appMetricsQueueSourceChecker)
|
||||
.counter(APPS_COMPLETED, 1)
|
||||
.checkAgainst(leaf.queueSource, true);
|
||||
|
|
|
@ -476,7 +476,7 @@ public class TestRMWebServices extends JerseyTestBase {
|
|||
Exception {
|
||||
assertEquals("incorrect number of elements", 1, json.length());
|
||||
JSONObject clusterinfo = json.getJSONObject("clusterMetrics");
|
||||
assertEquals("incorrect number of elements", 35, clusterinfo.length());
|
||||
assertEquals("incorrect number of elements", 36, clusterinfo.length());
|
||||
verifyClusterMetrics(
|
||||
clusterinfo.getInt("appsSubmitted"), clusterinfo.getInt("appsCompleted"),
|
||||
clusterinfo.getInt("reservedMB"), clusterinfo.getInt("availableMB"),
|
||||
|
|
Loading…
Reference in New Issue