Skip to content

Commit

Permalink
Merge pull request #83 from holdenk/fix-scala-2.11-issue
Browse files Browse the repository at this point in the history
Fix scala 2.11 issue
  • Loading branch information
holdenk committed Mar 24, 2016
2 parents 6cb1b8b + 36f43ff commit 808c2ac
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mini-cross-build.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use File::Slurp;
use strict;
use warnings;
my @spark_versions = ("1.3.0", "1.3.1", "1.4.0", "1.4.1", "1.5.0", "1.5.1", "1.5.2", "1.6.0");
my @spark_versions = ("1.3.0", "1.3.1", "1.4.0", "1.4.1", "1.5.0", "1.5.1", "1.5.2", "1.6.0", "1.6.1");
# Backup the build file
`cp build.sbt build.sbt_back`;
# Get the original version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,24 @@ trait StreamingSuiteBase extends FunSuite with BeforeAndAfterAll with Logging
assert(output(i) === expected(i))
}

// Wrappers with ordered = false
def testOperation[U: ClassTag, V: ClassTag](
input: Seq[Seq[U]],
operation: DStream[U] => DStream[V],
expectedOutput: Seq[Seq[V]]
) (implicit equality: Equality[V]): Unit = {
testOperation(input, operation, expectedOutput, false)
}

def testOperation[U: ClassTag, V: ClassTag, W: ClassTag](
input1: Seq[Seq[U]],
input2: Seq[Seq[V]],
operation: (DStream[U], DStream[V]) => DStream[W],
expectedOutput: Seq[Seq[W]]
) (implicit equality: Equality[W]): Unit = {
testOperation(input1, input2, operation, expectedOutput, false)
}

/**
* Test unary DStream operation with a list of inputs, with number of
* batches to run same as the number of input values.
Expand All @@ -122,7 +140,7 @@ trait StreamingSuiteBase extends FunSuite with BeforeAndAfterAll with Logging
input: Seq[Seq[U]],
operation: DStream[U] => DStream[V],
expectedOutput: Seq[Seq[V]],
ordered: Boolean = false
ordered: Boolean
) (implicit equality: Equality[V]): Unit = {
val numBatches = input.size

Expand Down Expand Up @@ -150,7 +168,7 @@ trait StreamingSuiteBase extends FunSuite with BeforeAndAfterAll with Logging
input2: Seq[Seq[V]],
operation: (DStream[U], DStream[V]) => DStream[W],
expectedOutput: Seq[Seq[W]],
ordered: Boolean = false
ordered: Boolean
) (implicit equality: Equality[W]): Unit = {
assert(input1.length === input2.length, "Length of the input lists are not equal")

Expand Down

0 comments on commit 808c2ac

Please sign in to comment.