Skip to content

Commit

Permalink
reset test SparkContext
Browse files Browse the repository at this point in the history
  • Loading branch information
witgo committed May 15, 2014
1 parent 63636b6 commit 52e6752
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@

package org.apache.spark.scheduler

import org.apache.spark.{SparkConf, SparkException, SparkContext}
import org.apache.spark.{LocalSparkContext, SparkConf, SparkException, SparkContext}
import org.apache.spark.util.{SerializableBuffer, AkkaUtils}

import org.scalatest.FunSuite

class CoarseGrainedSchedulerBackendSuite extends FunSuite {
class CoarseGrainedSchedulerBackendSuite extends FunSuite with LocalSparkContext {

test("serialized task larger than akka frame size") {
val conf = new SparkConf
conf.set("spark.akka.frameSize","1")
conf.set("spark.default.parallelism","1")
val sc = new SparkContext("local-cluster[2 , 1 , 512]", "test", conf)
sc = new SparkContext("local-cluster[2 , 1 , 512]", "test", conf)
val frameSize = AkkaUtils.maxFrameSizeBytes(sc.conf)
val buffer = new SerializableBuffer(java.nio.ByteBuffer.allocate(2 * frameSize))
val larger = sc.parallelize(Seq(buffer))
Expand Down

0 comments on commit 52e6752

Please sign in to comment.