com.holdenkarau.spark.testing

StreamingSuiteBase

trait StreamingSuiteBase extends FunSuite with BeforeAndAfterAll with Logging with PerTestSparkContext

This is the base trait for Spark Streaming testsuites. This provides basic functionality to run user-defined set of input on user-defined stream operations, and verify the output.

Linear Supertypes
PerTestSparkContext, LocalSparkContext, BeforeAndAfterEach, Logging, BeforeAndAfterAll, SuiteMixin, FunSuite, FunSuiteLike, Documenting, Alerting, Notifying, Informing, TestRegistration, Suite, Serializable, AbstractSuite, Assertions, TripleEquals, TripleEqualsSupport, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. StreamingSuiteBase
  2. PerTestSparkContext
  3. LocalSparkContext
  4. BeforeAndAfterEach
  5. Logging
  6. BeforeAndAfterAll
  7. SuiteMixin
  8. FunSuite
  9. FunSuiteLike
  10. Documenting
  11. Alerting
  12. Notifying
  13. Informing
  14. TestRegistration
  15. Suite
  16. Serializable
  17. AbstractSuite
  18. Assertions
  19. TripleEquals
  20. TripleEqualsSupport
  21. AnyRef
  22. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class AssertionsHelper extends AnyRef

    Definition Classes
    Assertions
  2. class CheckingEqualizer[L] extends AnyRef

    Definition Classes
    TripleEqualsSupport
  3. class Equalizer[L] extends AnyRef

    Definition Classes
    TripleEqualsSupport
  4. class LegacyCheckingEqualizer[L] extends AnyRef

    Definition Classes
    TripleEqualsSupport
  5. class LegacyEqualizer[L] extends AnyRef

    Definition Classes
    TripleEqualsSupport
  6. trait NoArgTest extends () ⇒ Outcome with TestData

    Attributes
    protected
    Definition Classes
    Suite

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. def !==[T](right: Spread[T]): TripleEqualsInvocationOnSpread[T]

    Definition Classes
    TripleEqualsSupport
  4. def !==(right: Null): TripleEqualsInvocation[Null]

    Definition Classes
    TripleEqualsSupport
  5. def !==[T](right: T): TripleEqualsInvocation[T]

    Definition Classes
    TripleEqualsSupport
  6. final def ##(): Int

    Definition Classes
    AnyRef → Any
  7. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  8. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  9. def ===[T](right: Spread[T]): TripleEqualsInvocationOnSpread[T]

    Definition Classes
    TripleEqualsSupport
  10. def ===(right: Null): TripleEqualsInvocation[Null]

    Definition Classes
    TripleEqualsSupport
  11. def ===[T](right: T): TripleEqualsInvocation[T]

    Definition Classes
    TripleEqualsSupport
  12. def actuallyWait: Boolean

  13. def afterAll(): Unit

    Definition Classes
    StreamingSuiteBase → BeforeAndAfterAll
  14. def afterEach(): Unit

    Definition Classes
    LocalSparkContext → BeforeAndAfterEach
  15. def alert: Alerter

    Attributes
    protected
    Definition Classes
    FunSuiteLike → Alerting
  16. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  17. def assert(condition: Boolean, clue: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @macroImpl( ... )
  18. def assert(condition: Boolean): Unit

    Definition Classes
    Assertions
    Annotations
    @macroImpl( ... )
  19. def assertCompiles(code: String): Unit

    Definition Classes
    Assertions
    Annotations
    @macroImpl( ... )
  20. def assertDoesNotCompile(code: String): Unit

    Definition Classes
    Assertions
    Annotations
    @macroImpl( ... )
  21. def assertResult(expected: Any)(actual: Any): Unit

    Definition Classes
    Assertions
  22. def assertResult(expected: Any, clue: Any)(actual: Any): Unit

    Definition Classes
    Assertions
  23. def assertTypeError(code: String): Unit

    Definition Classes
    Assertions
    Annotations
    @macroImpl( ... )
  24. val assertionsHelper: AssertionsHelper

    Definition Classes
    Assertions
  25. def assume(condition: Boolean, clue: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @macroImpl( ... )
  26. def assume(condition: Boolean): Unit

    Definition Classes
    Assertions
    Annotations
    @macroImpl( ... )
  27. def batchDuration: Duration

  28. def beforeAll(): Unit

    Definition Classes
    StreamingSuiteBase → BeforeAndAfterAll
  29. def beforeEach(): Unit

    Definition Classes
    PerTestSparkContext → BeforeAndAfterEach
  30. def cancel(cause: Throwable): Nothing

    Definition Classes
    Assertions
  31. def cancel(message: String, cause: Throwable): Nothing

    Definition Classes
    Assertions
  32. def cancel(message: String): Nothing

    Definition Classes
    Assertions
  33. def cancel(): Nothing

    Definition Classes
    Assertions
  34. lazy val checkpointDir: String

  35. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. val conf: SparkConf

  37. def conversionCheckedConstraint[A, B](implicit equivalenceOfA: Equivalence[A], cnv: (B) ⇒ A): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  38. def convertEquivalenceToAToBConstraint[A, B](equivalenceOfB: Equivalence[B])(implicit ev: <:<[A, B]): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  39. def convertEquivalenceToAToBConversionConstraint[A, B](equivalenceOfB: Equivalence[B])(implicit ev: (A) ⇒ B): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  40. def convertEquivalenceToBToAConstraint[A, B](equivalenceOfA: Equivalence[A])(implicit ev: <:<[B, A]): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  41. def convertEquivalenceToBToAConversionConstraint[A, B](equivalenceOfA: Equivalence[A])(implicit ev: (B) ⇒ A): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  42. def convertToCheckingEqualizer[T](left: T): CheckingEqualizer[T]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  43. implicit def convertToEqualizer[T](left: T): Equalizer[T]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  44. def convertToLegacyCheckingEqualizer[T](left: T): LegacyCheckingEqualizer[T]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  45. def convertToLegacyEqualizer[T](left: T): LegacyEqualizer[T]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  46. def createTestInputStream[T](sc: SparkContext, ssc_: TestStreamingContext, input: Seq[Seq[T]])(implicit arg0: ClassTag[T]): InputDStream[T]

    This is a input stream just for the testsuites.

    This is a input stream just for the testsuites. This is equivalent to a checkpointable, replayable, reliable message queue like Kafka. It requires a sequence as input, and returns the i_th element at the i_th batch under manual clock.

  47. def defaultEquality[A]: Equality[A]

    Definition Classes
    TripleEqualsSupport
  48. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  49. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  50. val eventuallyTimeout: Timeout

  51. final def execute: Unit

    Definition Classes
    Suite
  52. final def execute(testName: String, configMap: ConfigMap, color: Boolean, durations: Boolean, shortstacks: Boolean, fullstacks: Boolean, stats: Boolean): Unit

    Definition Classes
    Suite
  53. def expectedTestCount(filter: Filter): Int

    Definition Classes
    Suite → AbstractSuite
  54. def fail(cause: Throwable): Nothing

    Definition Classes
    Assertions
  55. def fail(message: String, cause: Throwable): Nothing

    Definition Classes
    Assertions
  56. def fail(message: String): Nothing

    Definition Classes
    Assertions
  57. def fail(): Nothing

    Definition Classes
    Assertions
  58. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  59. def framework: String

  60. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  61. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  62. def ignore(testName: String, testTags: Tag*)(testFun: ⇒ Unit): Unit

    Attributes
    protected
    Definition Classes
    FunSuiteLike
  63. def info: Informer

    Attributes
    protected
    Definition Classes
    FunSuiteLike → Informing
  64. def intercept[T <: AnyRef](f: ⇒ Any)(implicit manifest: Manifest[T]): T

    Definition Classes
    Assertions
  65. val invokeBeforeAllAndAfterAllEvenIfNoTestsAreExpected: Boolean

    Definition Classes
    BeforeAndAfterAll
  66. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  67. def isTraceEnabled(): Boolean

    Attributes
    protected
    Definition Classes
    Logging
  68. def log: Logger

    Attributes
    protected
    Definition Classes
    Logging
  69. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  70. def logDebug(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  71. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  72. def logError(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  73. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  74. def logInfo(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  75. def logName: String

    Attributes
    protected
    Definition Classes
    Logging
  76. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  77. def logTrace(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  78. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  79. def logWarning(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  80. def lowPriorityConversionCheckedConstraint[A, B](implicit equivalenceOfB: Equivalence[B], cnv: (A) ⇒ B): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  81. def lowPriorityTypeCheckedConstraint[A, B](implicit equivalenceOfB: Equivalence[B], ev: <:<[A, B]): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  82. def markup: Documenter

    Attributes
    protected
    Definition Classes
    FunSuiteLike → Documenting
  83. def master: String

  84. def maxWaitTimeMillis: Int

  85. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  86. def nestedSuites: IndexedSeq[Suite]

    Definition Classes
    Suite → AbstractSuite
  87. def note: Notifier

    Attributes
    protected
    Definition Classes
    FunSuiteLike → Notifying
  88. final def notify(): Unit

    Definition Classes
    AnyRef
  89. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  90. def numInputPartitions: Int

  91. def pending: PendingNothing

    Definition Classes
    Suite
  92. def pendingUntilFixed(f: ⇒ Unit): Unit

    Definition Classes
    Suite
  93. final def registerIgnoredTest(testText: String, testTags: Tag*)(testFun: ⇒ Unit): Unit

    Definition Classes
    FunSuiteLike → TestRegistration
  94. final def registerTest(testText: String, testTags: Tag*)(testFun: ⇒ Unit): Unit

    Definition Classes
    FunSuiteLike → TestRegistration
  95. def rerunner: Option[String]

    Definition Classes
    Suite → AbstractSuite
  96. def resetSparkContext(): Unit

    Definition Classes
    LocalSparkContext
  97. def run(testName: Option[String], args: Args): Status

    Definition Classes
    BeforeAndAfterAll → SuiteMixin
  98. final def run(testName: Option[String], reporter: Reporter, stopper: Stopper, filter: Filter, configMap: Map[String, Any], distributor: Option[Distributor], tracker: Tracker): Status

    Definition Classes
    AbstractSuite
  99. def runNestedSuites(args: Args): Status

    Attributes
    protected
    Definition Classes
    Suite → AbstractSuite
  100. def runStreams[V](outputStream: TestOutputStream[V], ssc: TestStreamingContext, numBatches: Int, numExpectedOutput: Int)(implicit arg0: ClassTag[V]): Seq[Seq[V]]

    Runs the streams set up in ssc on manual clock for numBatches batches and returns the collected output.

    Runs the streams set up in ssc on manual clock for numBatches batches and returns the collected output. It will wait until numExpectedOutput number of output data has been collected or timeout (set by maxWaitTimeMillis) is reached.

    Returns a sequence of items for each RDD.

  101. def runTest(testName: String, args: Args): Status

    Attributes
    protected
    Definition Classes
    BeforeAndAfterEach → SuiteMixin
  102. def runTests(testName: Option[String], args: Args): Status

    Attributes
    protected
    Definition Classes
    FunSuiteLike → Suite → AbstractSuite
  103. var sc: SparkContext

    Definition Classes
    LocalSparkContext
  104. def setupStreams[U, V, W](input1: Seq[Seq[U]], input2: Seq[Seq[V]], operation: (DStream[U], DStream[V]) ⇒ DStream[W])(implicit arg0: ClassTag[U], arg1: ClassTag[V], arg2: ClassTag[W]): (TestOutputStream[W], TestStreamingContext)

    Set up required DStreams to test the binary operation using the sequence of input collections.

  105. def setupStreams[U, V](input: Seq[Seq[U]], operation: (DStream[U]) ⇒ DStream[V], numPartitions: Int = numInputPartitions)(implicit arg0: ClassTag[U], arg1: ClassTag[V]): (TestOutputStream[V], TestStreamingContext)

    Set up required DStreams to test the DStream operation using the two sequences of input collections.

  106. final val styleName: String

    Definition Classes
    FunSuiteLike → Suite → AbstractSuite
  107. def suiteId: String

    Definition Classes
    Suite
  108. def suiteName: String

    Definition Classes
    Suite
  109. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  110. def tags: Map[String, Set[String]]

    Definition Classes
    FunSuiteLike → Suite → AbstractSuite
  111. def test(testName: String, testTags: Tag*)(testFun: ⇒ Unit): Unit

    Attributes
    protected
    Definition Classes
    FunSuiteLike
  112. def testDataFor(testName: String, theConfigMap: ConfigMap): TestData

    Definition Classes
    FunSuiteLike → Suite
  113. def testNames: Set[String]

    Definition Classes
    FunSuiteLike → Suite → AbstractSuite
  114. def testOperation[U, V, W](input1: Seq[Seq[U]], input2: Seq[Seq[V]], operation: (DStream[U], DStream[V]) ⇒ DStream[W], expectedOutput: Seq[Seq[W]], numBatches: Int, useSet: Boolean)(implicit arg0: ClassTag[U], arg1: ClassTag[V], arg2: ClassTag[W]): Unit

    Test binary DStream operation with two lists of inputs

    Test binary DStream operation with two lists of inputs

    input1

    First sequence of input collections

    input2

    Second sequence of input collections

    operation

    Binary DStream operation to be applied to the 2 inputs

    expectedOutput

    Sequence of expected output collections

    numBatches

    Number of batches to run the operation for

    useSet

    Compare the output values with the expected output values as sets (order matters) or as lists (order does not matter)

  115. def testOperation[U, V, W](input1: Seq[Seq[U]], input2: Seq[Seq[V]], operation: (DStream[U], DStream[V]) ⇒ DStream[W], expectedOutput: Seq[Seq[W]], useSet: Boolean)(implicit arg0: ClassTag[U], arg1: ClassTag[V], arg2: ClassTag[W]): Unit

    Test binary DStream operation with two lists of inputs, with number of batches to run same as the number of expected output values

  116. def testOperation[U, V](input: Seq[Seq[U]], operation: (DStream[U]) ⇒ DStream[V], expectedOutput: Seq[Seq[V]], numBatches: Int, useSet: Boolean)(implicit arg0: ClassTag[U], arg1: ClassTag[V]): Unit

    Test unary DStream operation with a list of inputs

    Test unary DStream operation with a list of inputs

    input

    Sequence of input collections

    operation

    Binary DStream operation to be applied to the 2 inputs

    expectedOutput

    Sequence of expected output collections

    numBatches

    Number of batches to run the operation for

    useSet

    Compare the output values with the expected output values as sets (order matters) or as lists (order does not matter)

  117. def testOperation[U, V](input: Seq[Seq[U]], operation: (DStream[U]) ⇒ DStream[V], expectedOutput: Seq[Seq[V]], useSet: Boolean = false)(implicit arg0: ClassTag[U], arg1: ClassTag[V]): Unit

    Test unary DStream operation with a list of inputs, with number of batches to run same as the number of expected output values

  118. def testsFor(unit: Unit): Unit

    Attributes
    protected
    Definition Classes
    FunSuiteLike
  119. def toString(): String

    Definition Classes
    FunSuite → AnyRef → Any
  120. def trap[T](f: ⇒ T): Throwable

    Definition Classes
    Assertions
  121. def typeCheckedConstraint[A, B](implicit equivalenceOfA: Equivalence[A], ev: <:<[B, A]): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  122. implicit def unconstrainedEquality[A, B](implicit equalityOfA: Equality[A]): Constraint[A, B]

    Definition Classes
    TripleEquals → TripleEqualsSupport
  123. def useManualClock: Boolean

  124. def verifyOutput[V](output: Seq[Seq[V]], expectedOutput: Seq[Seq[V]], useSet: Boolean)(implicit arg0: ClassTag[V]): Unit

    Verify whether the output values after running a DStream operation is same as the expected output values, by comparing the output collections either as lists (order matters) or sets (order does not matter)

  125. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  126. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  127. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  128. def withClue[T](clue: Any)(fun: ⇒ T): T

    Definition Classes
    Assertions
  129. def withFixture(test: NoArgTest): Outcome

    Attributes
    protected
    Definition Classes
    Suite → AbstractSuite
  130. def withOutputAndStreamingContext[R](outputStreamSSC: (TestOutputStream[R], TestStreamingContext))(block: (TestOutputStream[R], TestStreamingContext) ⇒ Unit): Unit

    Run a block of code with the given StreamingContext and automatically stop the context when the block completes or when an exception is thrown.

Deprecated Value Members

  1. def afterAll(configMap: ConfigMap): Unit

    Attributes
    protected
    Definition Classes
    BeforeAndAfterAll
    Annotations
    @deprecated
    Deprecated

    Please use the afterAll(ConfigMap) method of trait BeforeAndAfterAllConfigMap instead.

  2. def afterEach(testData: TestData): Unit

    Attributes
    protected
    Definition Classes
    BeforeAndAfterEach
    Annotations
    @deprecated
    Deprecated

    Please use the afterEach(TestData) method of trait BeforeAndAfterEachTestData instead.

  3. def afterEach(configMap: ConfigMap): Unit

    Attributes
    protected
    Definition Classes
    BeforeAndAfterEach
    Annotations
    @deprecated
    Deprecated

    Please use the afterEach(TestData) method of trait BeforeAndAfterEachTestData instead.

  4. def assert(o: Option[String]): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This method has been deprecated in favor of macro assertion and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.

  5. def assert(o: Option[String], clue: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This method has been deprecated in favor of macro assertion and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.

  6. def assume(o: Option[String]): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This method has been deprecated in favor of macro assumption and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.

  7. def assume(o: Option[String], clue: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This method has been deprecated in favor of macro assumption and will be removed in a future version of ScalaTest. If you need this, please copy the source code into your own trait instead.

  8. def beforeAll(configMap: ConfigMap): Unit

    Attributes
    protected
    Definition Classes
    BeforeAndAfterAll
    Annotations
    @deprecated
    Deprecated

    Please use the beforeAll(ConfigMap) method of trait BeforeAndAfterAllConfigMap instead.

  9. def beforeEach(testData: TestData): Unit

    Attributes
    protected
    Definition Classes
    BeforeAndAfterEach
    Annotations
    @deprecated
    Deprecated

    Please use the beforeEach(TestData) method of trait BeforeAndAfterEachTestData instead.

  10. def beforeEach(configMap: ConfigMap): Unit

    Attributes
    protected
    Definition Classes
    BeforeAndAfterEach
    Annotations
    @deprecated
    Deprecated

    Please use the beforeEach(TestData) method of trait BeforeAndAfterEachTestData instead.

  11. def expect(expected: Any)(actual: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This expect method has been deprecated. Please replace all invocations of expect with an identical invocation of assertResult instead.

  12. def expect(expected: Any, clue: Any)(actual: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This expect method has been deprecated. Please replace all invocations of expect with an identical invocation of assertResult instead.

  13. def expectResult(expected: Any)(actual: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This expectResult method has been deprecated. Please replace all invocations of expectResult with an identical invocation of assertResult instead.

  14. def expectResult(expected: Any, clue: Any)(actual: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This expectResult method has been deprecated. Please replace all invocations of expectResult with an identical invocation of assertResult instead.

Inherited from PerTestSparkContext

Inherited from LocalSparkContext

Inherited from BeforeAndAfterEach

Inherited from Logging

Inherited from BeforeAndAfterAll

Inherited from SuiteMixin

Inherited from FunSuite

Inherited from FunSuiteLike

Inherited from Documenting

Inherited from Alerting

Inherited from Notifying

Inherited from Informing

Inherited from TestRegistration

Inherited from Suite

Inherited from Serializable

Inherited from AbstractSuite

Inherited from Assertions

Inherited from TripleEquals

Inherited from TripleEqualsSupport

Inherited from AnyRef

Inherited from Any

Ungrouped