Skip to content

Commit 0cd4974

Browse files
committed
Stop them servers
1 parent a7071fe commit 0cd4974

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/test/scala/org/apache/spark/ui/UISuite.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ class UISuite extends FunSuite {
109109
test("jetty selects different port under contention") {
110110
val server = new ServerSocket(0)
111111
val startPort = server.getLocalPort
112-
113112
val serverInfo1 = JettyUtils.startJettyServer(
114113
"0.0.0.0", startPort, Seq[ServletContextHandler](), new SparkConf)
115114
val serverInfo2 = JettyUtils.startJettyServer(
@@ -120,6 +119,9 @@ class UISuite extends FunSuite {
120119
assert(boundPort1 != startPort)
121120
assert(boundPort2 != startPort)
122121
assert(boundPort1 != boundPort2)
122+
serverInfo1.server.stop()
123+
serverInfo2.server.stop()
124+
server.close()
123125
}
124126

125127
test("jetty binds to port 0 correctly") {

0 commit comments

Comments
 (0)