Skip to content

Commit

Permalink
Fix the unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
zsxwing committed Apr 22, 2015
1 parent ad93295 commit ddf741a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ private[ui] class StreamingPage(parent: StreamingTab)
maxY: Long): Seq[Node] = {
val content = listener.receivedRecordsDistributions.map { case (receiverId, distribution) =>
generateInputReceiverRow(jsCollector, receiverId, distribution, minX, maxX, minY, maxY)
}.reduce(_ ++ _)
}.foldLeft[Seq[Node]](Nil)(_ ++ _)

<table class="table table-bordered">
<thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ class UISeleniumSuite
eventually(timeout(10 seconds), interval(50 milliseconds)) {
// check whether streaming page exists
go to (sparkUI.appUIAddress.stripSuffix("/") + "/streaming")
val statisticText = findAll(cssSelector("li strong")).map(_.text).toSeq
statisticText should contain("Network receivers:")
statisticText should contain("Batch interval:")
val h3Text = findAll(cssSelector("h3")).map(_.text).toSeq
h3Text should contain("Streaming Statistics")

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

eventually(timeout(10 seconds), interval(50 milliseconds)) {
go to (sparkUI.appUIAddress.stripSuffix("/") + "/streaming")
val statisticText = findAll(cssSelector("li strong")).map(_.text).toSeq
statisticText should not contain ("Network receivers:")
statisticText should not contain ("Batch interval:")
val h3Text = findAll(cssSelector("h3")).map(_.text).toSeq
h3Text should not contain("Streaming Statistics")
}
}
}
Expand Down

0 comments on commit ddf741a

Please sign in to comment.