diff --git a/core/pom.xml b/core/pom.xml
index b0f68880f1d8a..14b217d7fb22e 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -334,7 +334,7 @@
org.seleniumhq.selenium
- selenium-htmlunit-driver
+ htmlunit-driver
test
diff --git a/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala b/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala
index 4b4788f453243..f1962ef39fc06 100644
--- a/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala
+++ b/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala
@@ -23,6 +23,7 @@ import javax.servlet.DispatcherType
import javax.servlet.http._
import scala.language.implicitConversions
+import scala.util.Try
import scala.xml.Node
import org.eclipse.jetty.client.HttpClient
@@ -500,7 +501,11 @@ private[spark] case class ServerInfo(
threadPool match {
case pool: QueuedThreadPool =>
// Workaround for SPARK-30385 to avoid Jetty's acceptor thread shrink.
- pool.setIdleTimeout(0)
+ // As of Jetty 9.4.21, the implementation of
+ // QueuedThreadPool#setIdleTimeout is changed and IllegalStateException
+ // will be thrown if we try to set idle timeout after the server has started.
+ // But this workaround works for Jetty 9.4.28 by ignoring the exception.
+ Try(pool.setIdleTimeout(0))
case _ =>
}
server.stop()
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 909056eab8c5a..ecfdf481f4f6c 100644
--- a/core/src/test/scala/org/apache/spark/ui/UISeleniumSuite.scala
+++ b/core/src/test/scala/org/apache/spark/ui/UISeleniumSuite.scala
@@ -24,6 +24,7 @@ import javax.servlet.http.{HttpServletRequest, HttpServletResponse}
import scala.io.Source
import scala.xml.Node
+import com.gargoylesoftware.css.parser.CSSParseException
import com.gargoylesoftware.htmlunit.DefaultCssErrorHandler
import org.json4s._
import org.json4s.jackson.JsonMethods
@@ -33,7 +34,6 @@ import org.scalatest._
import org.scalatest.concurrent.Eventually._
import org.scalatest.time.SpanSugar._
import org.scalatestplus.selenium.WebBrowser
-import org.w3c.css.sac.CSSParseException
import org.apache.spark._
import org.apache.spark.LocalSparkContext._
diff --git a/pom.xml b/pom.xml
index 6620673a7e5fc..6667b56d27fe7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -139,7 +139,7 @@
com.twitter
1.6.0
- 9.4.18.v20190429
+ 9.4.28.v20200408
3.1.0
0.9.5
2.4.0
@@ -187,8 +187,8 @@
0.12.0
4.7.1
1.1
- 2.52.0
- 2.22
+ 3.141.59
+ 2.40.0
@@ -588,12 +588,16 @@
io.netty
netty
+
+ net.bytebuddy
+ byte-buddy
+
org.seleniumhq.selenium
- selenium-htmlunit-driver
- ${selenium.version}
+ htmlunit-driver
+ ${htmlunit.version}
test
diff --git a/sql/core/pom.xml b/sql/core/pom.xml
index 7c5fcba9c2131..e4ef1467a960e 100644
--- a/sql/core/pom.xml
+++ b/sql/core/pom.xml
@@ -162,7 +162,7 @@
org.seleniumhq.selenium
- selenium-htmlunit-driver
+ htmlunit-driver
test
diff --git a/sql/hive-thriftserver/pom.xml b/sql/hive-thriftserver/pom.xml
index 1de2677d5ede5..5bf20b209aff7 100644
--- a/sql/hive-thriftserver/pom.xml
+++ b/sql/hive-thriftserver/pom.xml
@@ -95,7 +95,7 @@
org.seleniumhq.selenium
- selenium-htmlunit-driver
+ htmlunit-driver
test
diff --git a/streaming/pom.xml b/streaming/pom.xml
index ea351d449481a..53b49dd320e94 100644
--- a/streaming/pom.xml
+++ b/streaming/pom.xml
@@ -109,7 +109,7 @@
org.seleniumhq.selenium
- selenium-htmlunit-driver
+ htmlunit-driver
test