Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Or committed May 16, 2015
1 parent 53b9936 commit 697c086
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ object KafkaUtils {
offsetRanges: Array[OffsetRange],
leaders: JMap[TopicAndPartition, Broker],
messageHandler: JFunction[MessageAndMetadata[K, V], R]
): JavaRDD[R] = {
): JavaRDD[R] = jsc.sc.withScope {
implicit val keyCmt: ClassTag[K] = ClassTag(keyClass)
implicit val valueCmt: ClassTag[V] = ClassTag(valueClass)
implicit val keyDecoderCmt: ClassTag[KD] = ClassTag(keyDecoderClass)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ class DStreamScopeSuite extends FunSuite with BeforeAndAfter with BeforeAndAfter
baseScopeName: String,
rddScope: RDDOperationScope,
batchTime: Long): Unit = {
val formattedBatchTime =
UIUtils.formatBatchTime(batchTime, ssc.graph.batchDuration.milliseconds)
val formattedBatchTime = UIUtils.formatBatchTime(
batchTime, ssc.graph.batchDuration.milliseconds, showYYYYMMSS = false)
assert(rddScope.id === s"${baseScopeId}_$batchTime")
assert(rddScope.name.replaceAll("\\n", " ") === s"$baseScopeName @ $formattedBatchTime")
}
Expand Down

0 comments on commit 697c086

Please sign in to comment.