SLIDER-768 IT for API and liveness in cluster status

Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/0d0b0899
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/0d0b0899
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/0d0b0899

Branch: refs/heads/develop
Commit: 0d0b0899bd3a7e437eff8f14d1ecb291eb33c47d
Parents: 2dfdf33
Author: Steve Loughran <[email protected]>
Authored: Mon Feb 2 15:31:42 2015 +0000
Committer: Steve Loughran <[email protected]>
Committed: Mon Feb 2 15:31:42 2015 +0000

----------------------------------------------------------------------
 .../apache/slider/funtest/lifecycle/AgentWebPagesIT.groovy  | 4 ++--
 .../lifecycle/AppsThroughAgentQueueAndLabelsIT.groovy       | 9 ++++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/0d0b0899/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentWebPagesIT.groovy
----------------------------------------------------------------------
diff --git 
a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentWebPagesIT.groovy
 
b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentWebPagesIT.groovy
index 33d45ed..bb82a86 100644
--- 
a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentWebPagesIT.groovy
+++ 
b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentWebPagesIT.groovy
@@ -115,13 +115,13 @@ public class AgentWebPagesIT extends AgentCommandTestBase
     def directAM = report.origTrackingUrl;
     // now attempt direct-to-AM pings
     LowLevelRestTestDelegates direct = new LowLevelRestTestDelegates(directAM,
-        proxyComplexVerbs)
+        directComplexVerbs)
 
     direct.testSuiteAll()
 
     // and via the proxy
     LowLevelRestTestDelegates proxied = new LowLevelRestTestDelegates(proxyAM,
-        directComplexVerbs)
+        proxyComplexVerbs)
     proxied.testSuiteAll()
     proxied.logCodahaleMetrics();
 

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/0d0b0899/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AppsThroughAgentQueueAndLabelsIT.groovy
----------------------------------------------------------------------
diff --git 
a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AppsThroughAgentQueueAndLabelsIT.groovy
 
b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AppsThroughAgentQueueAndLabelsIT.groovy
index 4ef3905..5758feb 100644
--- 
a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AppsThroughAgentQueueAndLabelsIT.groovy
+++ 
b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AppsThroughAgentQueueAndLabelsIT.groovy
@@ -21,6 +21,7 @@ package org.apache.slider.funtest.lifecycle
 import groovy.transform.CompileStatic
 import groovy.util.logging.Slf4j
 import org.apache.hadoop.yarn.api.records.YarnApplicationState
+import org.apache.slider.api.StatusKeys
 import org.apache.slider.common.SliderExitCodes
 import org.apache.slider.common.params.Arguments
 import org.apache.slider.common.params.SliderActions
@@ -114,7 +115,13 @@ implements FuntestProperties, Arguments, SliderExitCodes, 
SliderActions {
 
     sleep(1000 * 20)
     def cd = execStatus(APPLICATION_NAME)
-    assert cd.statistics[COMMAND_LOGGER]["containers.requested"] >= 3
+    assert cd.statistics[COMMAND_LOGGER][
+        StatusKeys.STATISTICS_CONTAINERS_REQUESTED] >= 3
+    // check liveness
+    def liveness =  cd.liveness
+    assert liveness.allRequestsSatisfied
+    assert 0 == liveness.requestsOutstanding
+
     assertInYarnState(appId, YarnApplicationState.RUNNING)
   }
 

Reply via email to