Skip to content

Commit ddf741a

Browse files
committed
Fix the unit test
1 parent ad93295 commit ddf741a

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ private[ui] class StreamingPage(parent: StreamingTab)
318318
maxY: Long): Seq[Node] = {
319319
val content = listener.receivedRecordsDistributions.map { case (receiverId, distribution) =>
320320
generateInputReceiverRow(jsCollector, receiverId, distribution, minX, maxX, minY, maxY)
321-
}.reduce(_ ++ _)
321+
}.foldLeft[Seq[Node]](Nil)(_ ++ _)
322322

323323
<table class="table table-bordered">
324324
<thead>

streaming/src/test/scala/org/apache/spark/streaming/UISeleniumSuite.scala

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,8 @@ class UISeleniumSuite
7272
eventually(timeout(10 seconds), interval(50 milliseconds)) {
7373
// check whether streaming page exists
7474
go to (sparkUI.appUIAddress.stripSuffix("/") + "/streaming")
75-
val statisticText = findAll(cssSelector("li strong")).map(_.text).toSeq
76-
statisticText should contain("Network receivers:")
77-
statisticText should contain("Batch interval:")
75+
val h3Text = findAll(cssSelector("h3")).map(_.text).toSeq
76+
h3Text should contain("Streaming Statistics")
7877

7978
val h4Text = findAll(cssSelector("h4")).map(_.text).toSeq
8079
h4Text should contain("Active Batches (0)")
@@ -97,9 +96,8 @@ class UISeleniumSuite
9796

9897
eventually(timeout(10 seconds), interval(50 milliseconds)) {
9998
go to (sparkUI.appUIAddress.stripSuffix("/") + "/streaming")
100-
val statisticText = findAll(cssSelector("li strong")).map(_.text).toSeq
101-
statisticText should not contain ("Network receivers:")
102-
statisticText should not contain ("Batch interval:")
99+
val h3Text = findAll(cssSelector("h3")).map(_.text).toSeq
100+
h3Text should not contain("Streaming Statistics")
103101
}
104102
}
105103
}

0 commit comments

Comments
 (0)