Move streaming test initialization into 'before' blocks

This commit is contained in:
Jey Kottalam 2013-03-26 18:14:04 -07:00
parent bc36ee4fbb
commit b569b3f200
2 changed files with 8 additions and 4 deletions

View file

@ -6,10 +6,12 @@ import util.ManualClock
class BasicOperationsSuite extends TestSuiteBase {
System.setProperty("spark.streaming.clock", "spark.streaming.util.ManualClock")
override def framework() = "BasicOperationsSuite"
before {
System.setProperty("spark.streaming.clock", "spark.streaming.util.ManualClock")
}
after {
// To avoid Akka rebinding to the same port, since it doesn't unbind immediately on shutdown
System.clearProperty("spark.driver.port")

View file

@ -30,12 +30,14 @@ import com.google.common.io.Files
class InputStreamsSuite extends TestSuiteBase with BeforeAndAfter {
System.setProperty("spark.streaming.clock", "spark.streaming.util.ManualClock")
val testPort = 9999
override def checkpointDir = "checkpoint"
before {
System.setProperty("spark.streaming.clock", "spark.streaming.util.ManualClock")
}
after {
// To avoid Akka rebinding to the same port, since it doesn't unbind immediately on shutdown
System.clearProperty("spark.driver.port")