Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Replaced SharedSparkSession with LocalSparkSession
  • Loading branch information
Efim Poberezkin committed Apr 13, 2018
commit 8fa609cd8ad6130aa16b9bf624fe5b5e0f5ef256
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@ import org.scalatest.mockito.MockitoSugar

import org.apache.spark._
import org.apache.spark.rpc.RpcEndpointRef
import org.apache.spark.sql.LocalSparkSession
import org.apache.spark.sql.execution.streaming.continuous._
import org.apache.spark.sql.sources.v2.reader.streaming.{ContinuousReader, PartitionOffset}
import org.apache.spark.sql.sources.v2.writer.WriterCommitMessage
import org.apache.spark.sql.sources.v2.writer.streaming.StreamWriter
import org.apache.spark.sql.test.SharedSparkSession
import org.apache.spark.sql.test.TestSparkSession

class EpochCoordinatorSuite
extends SparkFunSuite
with SharedSparkSession
with LocalSparkSession
with MockitoSugar
with BeforeAndAfterEach {

Expand All @@ -49,14 +50,12 @@ class EpochCoordinatorSuite
query = mock[ContinuousExecution]
orderVerifier = inOrder(writer, query)

spark = new TestSparkSession()

epochCoordinator
= EpochCoordinatorRef.create(writer, reader, query, "test", 1, spark, SparkEnv.get)
}

override def afterEach(): Unit = {
SparkEnv.get.rpcEnv.stop(epochCoordinator)
}

test("single epoch") {
setWriterPartitions(3)
setReaderPartitions(2)
Expand Down