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:51 UTC

[43/50] incubator-slider git commit: SLIDER-689 AgentWebPagesIT fails to run against a kerberos cluster

SLIDER-689 AgentWebPagesIT fails to run against a kerberos cluster


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

Branch: refs/heads/feature/SLIDER-151_REST_API
Commit: 7454e0b145f4a5e852e91cacf1df3411d2c42169
Parents: 515ccba
Author: Steve Loughran <st...@apache.org>
Authored: Wed Dec 17 18:01:40 2014 +0000
Committer: Steve Loughran <st...@apache.org>
Committed: Wed Dec 17 18:01:40 2014 +0000

----------------------------------------------------------------------
 .../funtest/framework/CommandTestBase.groovy    |  8 ++++----
 .../funtest/lifecycle/AgentWebPagesIT.groovy    | 21 ++++++++------------
 2 files changed, 12 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/7454e0b1/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 143d284..00b4062 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
@@ -1280,6 +1280,7 @@ abstract class CommandTestBase extends SliderTestUtils {
    */
   protected static Outcome isRootWebPageUp(
       Map<String, String> args) {
+
     assert args['applicationId'] != null
     String applicationId = args['applicationId'];
     def sar = lookupApplication(applicationId)
@@ -1288,7 +1289,7 @@ abstract class CommandTestBase extends SliderTestUtils {
       return Outcome.Retry;
     }
     try {
-      GET(sar.url)
+      getWebPage(sar.url)
       return Outcome.Success
     } catch (Exception e) {
       return Outcome.Retry;
@@ -1301,8 +1302,7 @@ abstract class CommandTestBase extends SliderTestUtils {
    * @param launch_timeout launch timeout
    */
   void expectRootWebPageUp(
-      String applicationId,
-      int launch_timeout) {
+      String applicationId, int launch_timeout) {
 
     repeatUntilSuccess(
         "await root web page",
@@ -1319,7 +1319,7 @@ abstract class CommandTestBase extends SliderTestUtils {
       assert sar != null;
       assert sar.url
       // this is the final failure cause
-      GET(sar.url)
+      getWebPage(sar.url)
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/7454e0b1/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentWebPagesIT.groovy
----------------------------------------------------------------------
diff --git a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentWebPagesIT.groovy b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentWebPagesIT.groovy
index d29fe63..f5c35f3 100644
--- a/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentWebPagesIT.groovy
+++ b/slider-funtest/src/test/groovy/org/apache/slider/funtest/lifecycle/AgentWebPagesIT.groovy
@@ -20,25 +20,17 @@ package org.apache.slider.funtest.lifecycle
 
 import groovy.transform.CompileStatic
 import groovy.util.logging.Slf4j
-import org.apache.hadoop.registry.client.binding.RegistryUtils
-import org.apache.hadoop.registry.client.types.Endpoint
-import org.apache.hadoop.registry.client.types.ServiceRecord
-import org.apache.hadoop.yarn.api.records.YarnApplicationState
 import org.apache.slider.common.SliderExitCodes
-import org.apache.slider.common.SliderKeys
 import org.apache.slider.common.params.Arguments
 import org.apache.slider.common.params.SliderActions
 import org.apache.slider.funtest.framework.AgentCommandTestBase
 import org.apache.slider.funtest.framework.FuntestProperties
 import org.apache.slider.funtest.framework.SliderShell
 import org.apache.slider.server.appmaster.web.rest.RestPaths
-import org.apache.slider.test.Outcome
 import org.junit.After
 import org.junit.Before
 import org.junit.Test
 
-import static org.apache.slider.core.registry.info.CustomRegistryConstants.*
-
 @CompileStatic
 @Slf4j
 public class AgentWebPagesIT extends AgentCommandTestBase
@@ -73,6 +65,10 @@ public class AgentWebPagesIT extends AgentCommandTestBase
 
     logShell(shell)
 
+    def conf = SLIDER_CONFIG
+
+    initConnectionFactory(conf)
+
     def appId = ensureYarnApplicationIsUp(launchReportFile)
     assert appId
     expectRootWebPageUp(appId, instanceLaunchTime)
@@ -82,12 +78,11 @@ public class AgentWebPagesIT extends AgentCommandTestBase
     def report = loadAppReport(liveReportFile)
     assert report.url
 
-    def conf = SLIDER_CONFIG
     def root = report.url
-    log.info getWebPage (conf, root, RestPaths.SYSTEM_METRICS)
-    log.info getWebPage(conf, root, RestPaths.SYSTEM_THREADS)
-    log.info getWebPage(conf, root, RestPaths.SYSTEM_HEALTHCHECK)
-    log.info getWebPage(conf, root, RestPaths.SYSTEM_PING)
+    log.info getWebPage(root, RestPaths.SYSTEM_METRICS)
+    log.info getWebPage(root, RestPaths.SYSTEM_THREADS)
+    log.info getWebPage(root, RestPaths.SYSTEM_HEALTHCHECK)
+    log.info getWebPage(root, RestPaths.SYSTEM_PING)
   }
 
 }