You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2014/11/02 15:25:40 UTC

[28/50] git commit: SLIDER-570: AgentFailuresIT

SLIDER-570: AgentFailuresIT


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

Branch: refs/heads/feature/SLIDER-531-registry-enhancements
Commit: 6e171c77f11bf196f56b05d34c6ffb4523476fbd
Parents: e7df654
Author: Steve Loughran <st...@apache.org>
Authored: Thu Oct 30 23:06:25 2014 +0000
Committer: Steve Loughran <st...@apache.org>
Committed: Fri Oct 31 11:07:50 2014 +0000

----------------------------------------------------------------------
 .../org/apache/slider/funtest/framework/CommandTestBase.groovy   | 4 ++--
 .../org/apache/slider/funtest/lifecycle/AgentFailuresIT.groovy   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e171c77/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
----------------------------------------------------------------------
diff --git a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
index 0a7b295..fc74129 100644
--- a/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
+++ b/slider-funtest/src/main/groovy/org/apache/slider/funtest/framework/CommandTestBase.groovy
@@ -1051,14 +1051,14 @@ abstract class CommandTestBase extends SliderTestUtils {
     return requested
   }
 
-  boolean hasRequestedContainerCountReached(Map<String, String> args) {
+  Outcome hasRequestedContainerCountReached(Map<String, String> args) {
     String application = args['application']
     String role = args['role']
     int expectedCount = args['limit'].toInteger();
 
     int requestedCount = queryRequestedCount(application, role)
     log.debug("requested count = $requestedCount; expected=$expectedCount")
-    return requestedCount >= expectedCount
+    return Outcome.fromBool(requestedCount >= expectedCount)
   }
 
   void expectContainerRequestedCountReached(String application, String role, int limit) {

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6e171c77/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentFailuresIT.groovy
----------------------------------------------------------------------
diff --git a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentFailuresIT.groovy b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentFailuresIT.groovy
index d5be0f8..0410881 100644
--- a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentFailuresIT.groovy
+++ b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentFailuresIT.groovy
@@ -66,7 +66,7 @@ implements FuntestProperties, Arguments, SliderExitCodes, SliderActions {
 
     expectContainerRequestedCountReached(APPLICATION_NAME, COMMAND_LOGGER, 2)
     sleep(1000 * 20)
-    assert isApplicationUp(APPLICATION_NAME), 'App is not running.'
+    assertInYarnState(appId, YarnApplicationState.RUNNING)
     def cd = expectContainersLive(APPLICATION_NAME, COMMAND_LOGGER, 1)
     assert cd.statistics[COMMAND_LOGGER]["containers.requested"] >= 2
     assertInYarnState(appId, YarnApplicationState.RUNNING)