Github user liancheng commented on a diff in the pull request:
https://github.com/apache/spark/pull/3946#discussion_r22642963
--- Diff:
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suite.scala
---
@@ -379,4 +421,33 @@ class HiveThriftServer2Suite extends FunSuite with
Logging {
}
}
}
+
+ test("SPARK-5100 monitor page") {
+ val uiPort = randomListeningPort
+ withThriftUIAndJDBC(uiPort) { statement =>
+ val queries = Seq(
+ "DROP TABLE IF EXISTS test_map",
+ "CREATE TABLE test_map(key INT, value STRING)",
+ s"LOAD DATA LOCAL INPATH '${TestData.smallKv}' OVERWRITE INTO
TABLE test_map")
+
+ queries.foreach(statement.execute)
+
+ eventually(timeout(10 seconds), interval(50 milliseconds)) {
+ val html = Source.fromURL(s"http://localhost:$uiPort").mkString
+
+ // check whether new page exists
+ assert(html.toLowerCase.contains("thriftserver"))
+ }
+
+ eventually(timeout(10 seconds), interval(50 milliseconds)) {
+ val html =
Source.fromURL(s"http://localhost:$uiPort/ThriftServer/").mkString
+ assert(!html.contains("random data that should not be present"))
+
+ // check whether statements exists
+ queries.foreach{ line =>
--- End diff --
Space before `{`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]