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/12/18 22:32:22 UTC

[14/50] incubator-slider git commit: SLIDER-646 AgentLaunchFailureIT test failing at times

SLIDER-646 AgentLaunchFailureIT test failing at times


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

Branch: refs/heads/feature/SLIDER-151_REST_API
Commit: 957eb1a257529967244b691ded58ab0e82b086d0
Parents: d73e7e1
Author: Gour Saha <go...@apache.org>
Authored: Thu Dec 4 04:00:35 2014 -0800
Committer: Gour Saha <go...@apache.org>
Committed: Thu Dec 4 04:00:35 2014 -0800

----------------------------------------------------------------------
 .../funtest/lifecycle/AgentLaunchFailureIT.groovy     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/957eb1a2/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentLaunchFailureIT.groovy
----------------------------------------------------------------------
diff --git a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentLaunchFailureIT.groovy b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentLaunchFailureIT.groovy
index 51a9010..791bd9e 100644
--- a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentLaunchFailureIT.groovy
+++ b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentLaunchFailureIT.groovy
@@ -87,6 +87,20 @@ public class AgentLaunchFailureIT extends AgentCommandTestBase
     describe("Awaiting failure")
     try {
       ensureYarnApplicationIsUp(appId)
+      /*
+       Under certain scenarios the app reaches the RUNNING state and gets
+       probed in that state as well. The timings and delays in this test
+       and the delays between scheduling of ChaosKillAM action cannot
+       ensure that the app will never reach RUNNING state. Since, the
+       target of this test is to check that chaos monkey kills the app,
+       calling this twice will ensure that the app reaches the FINISHED
+       state if chaos monkey is doing its job. If the app reaches FINISHED
+       state in the first call itself then this second call will never be
+       made. If this second call succeeds as well then chaos monkey is not
+       doing its job and the test should fail.
+       */
+      describe("app is running is checked twice")
+      ensureYarnApplicationIsUp(appId)
       fail("application is up")
     } catch (AssertionError e) {
       if(!e.toString().contains(SliderAppMaster.E_TRIGGERED_LAUNCH_FAILURE)) {