Repository: incubator-slider Updated Branches: refs/heads/releases/slider-0.60 aa1bd1945 -> 0cb6eaf76
SLIDER-646 intermittent AgentLaunchFailureIT test failures Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/0cb6eaf7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/0cb6eaf7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/0cb6eaf7 Branch: refs/heads/releases/slider-0.60 Commit: 0cb6eaf76dc94f053ad9d0561b5b78a81c736494 Parents: aa1bd19 Author: Steve Loughran <[email protected]> Authored: Thu Nov 13 14:01:40 2014 +0000 Committer: Steve Loughran <[email protected]> Committed: Thu Nov 13 14:02:13 2014 +0000 ---------------------------------------------------------------------- .../slider/funtest/framework/CommandTestBase.groovy | 14 +++++++++++--- .../funtest/lifecycle/AgentLaunchFailureIT.groovy | 4 +++- 2 files changed, 14 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/0cb6eaf7/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 210e257..1cb245a 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 @@ -615,10 +615,15 @@ abstract class CommandTestBase extends SliderTestUtils { } /** - * Create a templated slider app + * Create a templated slider app. + * <p> + * If the extraArgs list does not contain a --wait parm then a wait + * duration of THAW_WAIT_TIME will be added to the launch args. * @param name name * @param appTemplate application template * @param resourceTemplate resource template + * @param extraArgs list of extra arguments to the command + * @param launchReportFile optional file to save the AM launch report to * @return the shell */ public SliderShell createTemplatedSliderApplication( @@ -638,9 +643,12 @@ abstract class CommandTestBase extends SliderTestUtils { ACTION_CREATE, name, ARG_TEMPLATE, appTemplate, ARG_RESOURCES, resourceTemplate, - ARG_OUTPUT, launchReportFile.absolutePath, - ARG_WAIT, Integer.toString(THAW_WAIT_TIME) + ARG_OUTPUT, launchReportFile.absolutePath ] + + if (!extraArgs.contains(ARG_WAIT)) { + commands << ARG_WAIT << Integer.toString(THAW_WAIT_TIME) + } maybeAddCommandOption(commands, [ARG_COMP_OPT, SliderKeys.COMPONENT_AM, SliderXmlConfKeys.KEY_AM_LOGIN_KEYTAB_NAME], http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/0cb6eaf7/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 2e1ca0f..51a9010 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 @@ -20,6 +20,7 @@ package org.apache.slider.funtest.lifecycle import groovy.transform.CompileStatic import groovy.util.logging.Slf4j +import org.apache.slider.common.SliderXmlConfKeys import org.apache.slider.server.appmaster.SliderAppMaster import static org.apache.slider.api.InternalKeys.* @@ -69,6 +70,8 @@ public class AgentLaunchFailureIT extends AgentCommandTestBase ARG_OPTION, CHAOS_MONKEY_INTERVAL_SECONDS, "60", ARG_OPTION, CHAOS_MONKEY_PROBABILITY_AM_LAUNCH_FAILURE, Integer.toString(PROBABILITY_PERCENT_100), + ARG_DEFINE, SliderXmlConfKeys.KEY_AM_RESTART_LIMIT + "=1", + ARG_WAIT, "0" ], launchReportFile) @@ -93,6 +96,5 @@ public class AgentLaunchFailureIT extends AgentCommandTestBase def sar = lookupApplication(appId) log.info(sar.toString()) assert sar.diagnostics.contains(SliderAppMaster.E_TRIGGERED_LAUNCH_FAILURE) - } }
