aboutsummaryrefslogtreecommitdiff
path: root/core/src/test
diff options
context:
space:
mode:
authorSean Owen <sowen@cloudera.com>2015-05-01 19:57:37 +0100
committerSean Owen <sowen@cloudera.com>2015-05-01 19:57:37 +0100
commit1262e310cd294c8fd936c55c3281ed855824ea27 (patch)
treec0f510c55b064393feb3ed3496ae05cebf5dd0a2 /core/src/test
parent7d427222dca4807ec55e8d9a7de6ffe861cd0d24 (diff)
downloadspark-1262e310cd294c8fd936c55c3281ed855824ea27.tar.gz
spark-1262e310cd294c8fd936c55c3281ed855824ea27.tar.bz2
spark-1262e310cd294c8fd936c55c3281ed855824ea27.zip
[SPARK-6846] [WEBUI] [HOTFIX] return to GET for kill link in UI since YARN AM won't proxy POST
Partial undoing of SPARK-6846; YARN AM proxy won't forward POSTs, so go back to GET for kill links in Spark UI. Standalone UIs are not affected. Author: Sean Owen <sowen@cloudera.com> Closes #5837 from srowen/SPARK-6846.2 and squashes the following commits: c17c386 [Sean Owen] Partial undoing of SPARK-6846; YARN AM proxy won't forward POSTs, so go back to GET for kill links in Spark UI. Standalone UIs are not affected.
Diffstat (limited to 'core/src/test')
-rw-r--r--core/src/test/scala/org/apache/spark/ui/UISeleniumSuite.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/test/scala/org/apache/spark/ui/UISeleniumSuite.scala b/core/src/test/scala/org/apache/spark/ui/UISeleniumSuite.scala
index eb9db550fd..d53d7f3ba5 100644
--- a/core/src/test/scala/org/apache/spark/ui/UISeleniumSuite.scala
+++ b/core/src/test/scala/org/apache/spark/ui/UISeleniumSuite.scala
@@ -350,7 +350,7 @@ class UISeleniumSuite extends FunSuite with WebBrowser with Matchers with Before
}
}
- test("kill stage is POST only") {
+ test("kill stage POST/GET response is correct") {
def getResponseCode(url: URL, method: String): Int = {
val connection = url.openConnection().asInstanceOf[HttpURLConnection]
connection.setRequestMethod(method)
@@ -365,7 +365,8 @@ class UISeleniumSuite extends FunSuite with WebBrowser with Matchers with Before
eventually(timeout(5 seconds), interval(50 milliseconds)) {
val url = new URL(
sc.ui.get.appUIAddress.stripSuffix("/") + "/stages/stage/kill/?id=0&terminate=true")
- getResponseCode(url, "GET") should be (405)
+ // SPARK-6846: should be POST only but YARN AM doesn't proxy POST
+ getResponseCode(url, "GET") should be (200)
getResponseCode(url, "POST") should be (200)
}
}