Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,18 @@

package org.apache.spark.sql.hive.thriftserver



import scala.util.Random

import org.apache.hadoop.hive.conf.HiveConf.ConfVars
import org.openqa.selenium.WebDriver
import org.openqa.selenium.htmlunit.HtmlUnitDriver
import org.scalatest.{Matchers, BeforeAndAfterAll}
import org.scalatest.concurrent.Eventually._
import org.scalatest.selenium.WebBrowser
import org.scalatest.time.SpanSugar._
import org.scalatest.{BeforeAndAfterAll, Matchers}

import org.apache.hadoop.hive.conf.HiveConf.ConfVars
import org.apache.spark.sql.hive.HiveContext


class UISeleniumSuite
extends HiveThriftJdbcTest
with WebBrowser with Matchers with BeforeAndAfterAll {
Expand Down Expand Up @@ -75,9 +72,9 @@ class UISeleniumSuite
""".stripMargin.split("\\s+").toSeq
}

test("thrift server ui test") {
ignore("thrift server ui test") {
withJdbcStatement(statement =>{
val baseURL = s"http://localhost:${uiPort}"
val baseURL = s"http://localhost:$uiPort"

val queries = Seq(
"CREATE TABLE test_map(key INT, value STRING)",
Expand All @@ -86,14 +83,14 @@ class UISeleniumSuite
queries.foreach(statement.execute)

eventually(timeout(10 seconds), interval(50 milliseconds)) {
go to (baseURL)
find(cssSelector("""ul li a[href*="ThriftServer"]""")) should not be(None)
go to baseURL
find(cssSelector("""ul li a[href*="ThriftServer"]""")) should not be None
}

eventually(timeout(10 seconds), interval(50 milliseconds)) {
go to (baseURL + "/ThriftServer")
find(id("sessionstat")) should not be(None)
find(id("sqlstat")) should not be(None)
find(id("sessionstat")) should not be None
find(id("sqlstat")) should not be None

// check whether statements exists
queries.foreach { line =>
Expand Down