Skip to content

Commit c450b5f

Browse files
committed
fix test
1 parent e1c1d7e commit c450b5f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

core/src/test/scala/org/apache/spark/SparkUISuite.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ import org.scalatest.FunSuite
2323

2424
class SparkUISuite extends FunSuite with SharedSparkContext {
2525

26-
test("verify appUIHostPort doesn't contain scheme") {
27-
val appUIUri = new URI(sc.ui.appUIHostPort)
28-
assert(!appUIUri.getScheme().startsWith("http"))
26+
test("verify appUIAddress contains the scheme") {
27+
val uiAddress = sc.ui.appUIAddress
28+
assert(uiAddress.equals("http://" + sc.ui.appUIHostPort))
2929
}
3030

31-
test("verify appUIAddress contains the scheme") {
32-
val appUIUri = new URI(sc.ui.appUIAddress)
33-
assert(appUIUri.toString().equals("http://" + sc.ui.appUIHostPort))
31+
test("verify appUIAddress contains the port") {
32+
val splitUIAddress = sc.ui.appUIAddress.split(':')
33+
assert(splitUIAddress(2).toInt == sc.ui.boundPort)
3434
}
3535
}

0 commit comments

Comments
 (0)