Skip to content

Commit

Permalink
Revert "[SPARK-8781] Fix variables in published pom.xml are not resol…
Browse files Browse the repository at this point in the history
…ved"

This reverts commit 82cf331.

Conflicts:
	pom.xml
  • Loading branch information
Andrew Or committed Jul 7, 2015
1 parent 9eae5fa commit 929dfa2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
7 changes: 7 additions & 0 deletions extras/kinesis-asl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@
<artifactId>spark-streaming_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming_${scala.binary.version}</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,18 @@ import com.amazonaws.services.kinesis.clientlibrary.lib.worker.InitialPositionIn
import com.amazonaws.services.kinesis.clientlibrary.types.ShutdownReason
import com.amazonaws.services.kinesis.model.Record
import org.mockito.Mockito._
// scalastyle:off
// To avoid introducing a dependency on Spark core tests, simply use scalatest's FunSuite
// here instead of our own SparkFunSuite. Introducing the dependency has caused problems
// in the past (SPARK-8781) that are complicated by bugs in the maven shade plugin (MSHADE-148).
import org.scalatest.{BeforeAndAfter, FunSuite, Matchers}
import org.scalatest.{BeforeAndAfter, Matchers}
import org.scalatest.mock.MockitoSugar

import org.apache.spark.storage.StorageLevel
import org.apache.spark.streaming.{Milliseconds, Seconds, StreamingContext}
import org.apache.spark.streaming.{Milliseconds, Seconds, StreamingContext, TestSuiteBase}
import org.apache.spark.util.{Clock, ManualClock, Utils}

/**
* Suite of Kinesis streaming receiver tests focusing mostly on the KinesisRecordProcessor
*/
class KinesisReceiverSuite extends FunSuite with Matchers with BeforeAndAfter
with MockitoSugar {
// scalastyle:on
class KinesisReceiverSuite extends TestSuiteBase with Matchers with BeforeAndAfter
with MockitoSugar {

val app = "TestKinesisReceiver"
val stream = "mySparkStream"
Expand All @@ -62,23 +57,24 @@ class KinesisReceiverSuite extends FunSuite with Matchers with BeforeAndAfter
var checkpointStateMock: KinesisCheckpointState = _
var currentClockMock: Clock = _

before {
override def beforeFunction(): Unit = {
receiverMock = mock[KinesisReceiver]
checkpointerMock = mock[IRecordProcessorCheckpointer]
checkpointClockMock = mock[ManualClock]
checkpointStateMock = mock[KinesisCheckpointState]
currentClockMock = mock[Clock]
}

after {
override def afterFunction(): Unit = {
super.afterFunction()
// Since this suite was originally written using EasyMock, add this to preserve the old
// mocking semantics (see SPARK-5735 for more details)
verifyNoMoreInteractions(receiverMock, checkpointerMock, checkpointClockMock,
checkpointStateMock, currentClockMock)
}

test("KinesisUtils API") {
val ssc = new StreamingContext("local[2]", getClass.getSimpleName, Seconds(1))
val ssc = new StreamingContext(master, framework, batchDuration)
// Tests the API, does not actually test data receiving
val kinesisStream1 = KinesisUtils.createStream(ssc, "mySparkStream",
"https://kinesis.us-west-2.amazonaws.com", Seconds(2),
Expand Down

1 comment on commit 929dfa2

@andrewor14
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was reverted because the fix in #7219 is better.

Please sign in to comment.