Skip to content

Commit

Permalink
[SPARK-7326] [STREAMING] Performing window() on a WindowedDStream dos…
Browse files Browse the repository at this point in the history
…en't work all the time

Add some tests to cover the new function Time.floor(duration, zeroTime)
  • Loading branch information
wesleymiao committed May 8, 2015
1 parent 48b4dc0 commit 82a4d8c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ class TimeSuite extends TestSuiteBase {
assert(new Time(1200).floor(new Duration(200)) == new Time(1200))
assert(new Time(199).floor(new Duration(200)) == new Time(0))
assert(new Time(1).floor(new Duration(1)) == new Time(1))
assert(new Time(1350).floor(new Duration(200), new Time(50)) == new Time(1250))
assert(new Time(1350).floor(new Duration(200), new Time(150)) == new Time(1350))
assert(new Time(1350).floor(new Duration(200), new Time(200)) == new Time(1200))
}

test("isMultipleOf") {
Expand Down

0 comments on commit 82a4d8c

Please sign in to comment.