You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by sm...@apache.org on 2014/10/28 19:01:13 UTC
git commit: SLIDER-575. Slider fun-test stabilization (registry call
needs some retries)
Repository: incubator-slider
Updated Branches:
refs/heads/develop bb76e00e8 -> 0908d8fc8
SLIDER-575. Slider fun-test stabilization (registry call needs some retries)
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/0908d8fc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/0908d8fc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/0908d8fc
Branch: refs/heads/develop
Commit: 0908d8fc858a7ffa0bcd1d4ce87c4b8144178862
Parents: bb76e00
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Tue Oct 28 11:00:57 2014 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Tue Oct 28 11:00:57 2014 -0700
----------------------------------------------------------------------
.../funtest/framework/CommandTestBase.groovy | 29 ++++++++++++++++++--
.../funtest/lifecycle/AppsThroughAgentIT.groovy | 1 +
2 files changed, 28 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/0908d8fc/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 21ec1f2..004f2da 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
@@ -684,19 +684,44 @@ abstract class CommandTestBase extends SliderTestUtils {
return status
}
+ protected void ensureRegistryCallSucceeds(String application) {
+ repeatUntilTrue(this.&isRegistryAccessible,
+ 10,
+ 5 * 1000,
+ [application: application],
+ true,
+ 'Application registry is not accessible, failing test.') {
+ describe "final state of app that tests say is not able to access registry"
+ exists(application, true).dumpOutput()
+ }
+ }
+
protected void ensureApplicationIsUp(String application) {
repeatUntilTrue(this.&isApplicationRunning,
+ 30,
SLIDER_CONFIG.getInt(KEY_TEST_INSTANCE_LAUNCH_TIME,
DEFAULT_INSTANCE_LAUNCH_TIME_SECONDS),
- 1000,
[application: application],
true,
'Application did not start, failing test.') {
describe "final state of app that tests say is not up"
- exists(application,true).dumpOutput()
+ exists(application, true).dumpOutput()
}
}
+ protected boolean isRegistryAccessible(Map<String, String> args) {
+ String applicationName = args['application'];
+ SliderShell shell = slider(
+ [
+ ACTION_REGISTRY,
+ ARG_NAME,
+ applicationName,
+ ARG_LISTEXP])
+ if (EXIT_SUCCESS != shell.execute())
+ logShell(shell)
+ return EXIT_SUCCESS == shell.execute()
+ }
+
protected boolean isApplicationRunning(Map<String, String> args) {
String applicationName = args['application'];
return isApplicationInState(YarnApplicationState.RUNNING, applicationName);
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/0908d8fc/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AppsThroughAgentIT.groovy
----------------------------------------------------------------------
diff --git a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AppsThroughAgentIT.groovy b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AppsThroughAgentIT.groovy
index 80b5db7..372a0fa 100644
--- a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AppsThroughAgentIT.groovy
+++ b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AppsThroughAgentIT.groovy
@@ -74,6 +74,7 @@ implements FuntestProperties, Arguments, SliderExitCodes, SliderActions {
expectContainersLive(APPLICATION_NAME, COMMAND_LOGGER, 2)
+ ensureRegistryCallSucceeds(APPLICATION_NAME)
// get log folders
shell = slider(EXIT_SUCCESS,