Repository: incubator-slider
Updated Branches:
  refs/heads/branches/branch-0.6 f916ef8c2 -> 6ce99586a


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/6ce99586
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/6ce99586
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/6ce99586

Branch: refs/heads/branches/branch-0.6
Commit: 6ce99586a21a0f57b9f0d8c04fa4cdae221dfaf9
Parents: f916ef8
Author: Gour Saha <[email protected]>
Authored: Thu Dec 4 04:00:35 2014 -0800
Committer: Steve Loughran <[email protected]>
Committed: Fri Feb 6 14:21:31 2015 +0000

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


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6ce99586/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)) {

Reply via email to