Skip to content

Commit 66ea47c

Browse files
committed
Add the unit test.
1 parent dd0acc1 commit 66ea47c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,15 @@ class StreamingContextSuite extends SparkFunSuite with BeforeAndAfter with Timeo
112112
assert(ssc.conf.getTimeAsSeconds("spark.cleaner.ttl", "-1") === 10)
113113
}
114114

115+
test("checkPoint from conf") {
116+
val checkpointDirectory = Utils.createTempDir().getAbsolutePath()
117+
118+
val myConf = SparkContext.updatedConf(new SparkConf(false), master, appName)
119+
myConf.set("spark.streaming.checkpointDir", checkpointDirectory)
120+
val ssc = new StreamingContext(myConf, batchDuration)
121+
assert(ssc.checkpointDir != null)
122+
}
123+
115124
test("state matching") {
116125
import StreamingContextState._
117126
assert(INITIALIZED === INITIALIZED)

0 commit comments

Comments
 (0)