Skip to content

Commit c48b622

Browse files
witgopwendell
authored andcommitted
Resolve scalatest warnings during build
Author: witgo <[email protected]> Closes apache#1032 from witgo/ShouldMatchers and squashes the following commits: 7ebf34c [witgo] Resolve scalatest warnings during build
1 parent 4823bf4 commit c48b622

21 files changed

+41
-41
lines changed

core/src/test/scala/org/apache/spark/AccumulatorSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ package org.apache.spark
2020
import scala.collection.mutable
2121

2222
import org.scalatest.FunSuite
23-
import org.scalatest.matchers.ShouldMatchers
23+
import org.scalatest.Matchers
2424

2525
import org.apache.spark.SparkContext._
2626

27-
class AccumulatorSuite extends FunSuite with ShouldMatchers with LocalSparkContext {
27+
class AccumulatorSuite extends FunSuite with Matchers with LocalSparkContext {
2828

2929

3030
implicit def setAccum[A] = new AccumulableParam[mutable.Set[A], A] {

core/src/test/scala/org/apache/spark/DistributedSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ package org.apache.spark
2020
import org.scalatest.BeforeAndAfter
2121
import org.scalatest.FunSuite
2222
import org.scalatest.concurrent.Timeouts._
23-
import org.scalatest.matchers.ShouldMatchers
23+
import org.scalatest.Matchers
2424
import org.scalatest.time.{Millis, Span}
2525

2626
import org.apache.spark.SparkContext._
@@ -31,7 +31,7 @@ class NotSerializableClass
3131
class NotSerializableExn(val notSer: NotSerializableClass) extends Throwable() {}
3232

3333

34-
class DistributedSuite extends FunSuite with ShouldMatchers with BeforeAndAfter
34+
class DistributedSuite extends FunSuite with Matchers with BeforeAndAfter
3535
with LocalSparkContext {
3636

3737
val clusterUrl = "local-cluster[2,1,512]"

core/src/test/scala/org/apache/spark/JobCancellationSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import scala.concurrent.duration._
2525
import scala.concurrent.future
2626

2727
import org.scalatest.{BeforeAndAfter, FunSuite}
28-
import org.scalatest.matchers.ShouldMatchers
28+
import org.scalatest.Matchers
2929

3030
import org.apache.spark.SparkContext._
3131
import org.apache.spark.scheduler.{SparkListener, SparkListenerTaskStart}
@@ -35,7 +35,7 @@ import org.apache.spark.scheduler.{SparkListener, SparkListenerTaskStart}
3535
* (e.g. count) as well as multi-job action (e.g. take). We test the local and cluster schedulers
3636
* in both FIFO and fair scheduling modes.
3737
*/
38-
class JobCancellationSuite extends FunSuite with ShouldMatchers with BeforeAndAfter
38+
class JobCancellationSuite extends FunSuite with Matchers with BeforeAndAfter
3939
with LocalSparkContext {
4040

4141
override def afterEach() {

core/src/test/scala/org/apache/spark/ShuffleSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
package org.apache.spark
1919

2020
import org.scalatest.FunSuite
21-
import org.scalatest.matchers.ShouldMatchers
21+
import org.scalatest.Matchers
2222

2323
import org.apache.spark.SparkContext._
2424
import org.apache.spark.ShuffleSuite.NonJavaSerializableClass
2525
import org.apache.spark.rdd.{CoGroupedRDD, OrderedRDDFunctions, RDD, ShuffledRDD, SubtractedRDD}
2626
import org.apache.spark.serializer.KryoSerializer
2727
import org.apache.spark.util.MutablePair
2828

29-
class ShuffleSuite extends FunSuite with ShouldMatchers with LocalSparkContext {
29+
class ShuffleSuite extends FunSuite with Matchers with LocalSparkContext {
3030

3131
val conf = new SparkConf(loadDefaults = false)
3232

core/src/test/scala/org/apache/spark/deploy/ClientSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
package org.apache.spark.deploy
1919

2020
import org.scalatest.FunSuite
21-
import org.scalatest.matchers.ShouldMatchers
21+
import org.scalatest.Matchers
2222

23-
class ClientSuite extends FunSuite with ShouldMatchers {
23+
class ClientSuite extends FunSuite with Matchers {
2424
test("correctly validates driver jar URL's") {
2525
ClientArguments.isValidJarUrl("http://someHost:8080/foo.jar") should be (true)
2626
ClientArguments.isValidJarUrl("file://some/path/to/a/jarFile.jar") should be (true)

core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import org.apache.spark.{SparkConf, SparkContext, SparkEnv, SparkException, Test
2525
import org.apache.spark.deploy.SparkSubmit._
2626
import org.apache.spark.util.Utils
2727
import org.scalatest.FunSuite
28-
import org.scalatest.matchers.ShouldMatchers
28+
import org.scalatest.Matchers
2929

30-
class SparkSubmitSuite extends FunSuite with ShouldMatchers {
30+
class SparkSubmitSuite extends FunSuite with Matchers {
3131
def beforeAll() {
3232
System.setProperty("spark.testing", "true")
3333
}

core/src/test/scala/org/apache/spark/rdd/SortingSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
package org.apache.spark.rdd
1919

2020
import org.scalatest.FunSuite
21-
import org.scalatest.matchers.ShouldMatchers
21+
import org.scalatest.Matchers
2222

2323
import org.apache.spark.{Logging, SharedSparkContext}
2424
import org.apache.spark.SparkContext._
2525

26-
class SortingSuite extends FunSuite with SharedSparkContext with ShouldMatchers with Logging {
26+
class SortingSuite extends FunSuite with SharedSparkContext with Matchers with Logging {
2727

2828
test("sortByKey") {
2929
val pairs = sc.parallelize(Array((1, 0), (2, 0), (0, 0), (3, 0)), 2)

core/src/test/scala/org/apache/spark/scheduler/SparkListenerSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ import java.util.concurrent.Semaphore
2222
import scala.collection.mutable
2323

2424
import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll, FunSuite}
25-
import org.scalatest.matchers.ShouldMatchers
25+
import org.scalatest.Matchers
2626

2727
import org.apache.spark.{LocalSparkContext, SparkContext}
2828
import org.apache.spark.SparkContext._
2929
import org.apache.spark.executor.TaskMetrics
3030

31-
class SparkListenerSuite extends FunSuite with LocalSparkContext with ShouldMatchers
31+
class SparkListenerSuite extends FunSuite with LocalSparkContext with Matchers
3232
with BeforeAndAfter with BeforeAndAfterAll {
3333

3434
/** Length of time to wait while draining listener events. */

core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import org.mockito.Mockito.{mock, when}
2828
import org.scalatest.{BeforeAndAfter, FunSuite, PrivateMethodTester}
2929
import org.scalatest.concurrent.Eventually._
3030
import org.scalatest.concurrent.Timeouts._
31-
import org.scalatest.matchers.ShouldMatchers._
31+
import org.scalatest.Matchers
3232
import org.scalatest.time.SpanSugar._
3333

3434
import org.apache.spark.{MapOutputTrackerMaster, SecurityManager, SparkConf}
@@ -39,7 +39,8 @@ import org.apache.spark.util.{AkkaUtils, ByteBufferInputStream, SizeEstimator, U
3939
import scala.language.implicitConversions
4040
import scala.language.postfixOps
4141

42-
class BlockManagerSuite extends FunSuite with BeforeAndAfter with PrivateMethodTester {
42+
class BlockManagerSuite extends FunSuite with Matchers with BeforeAndAfter
43+
with PrivateMethodTester {
4344
private val conf = new SparkConf(false)
4445
var store: BlockManager = null
4546
var store2: BlockManager = null

core/src/test/scala/org/apache/spark/ui/jobs/JobProgressListenerSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
package org.apache.spark.ui.jobs
1919

2020
import org.scalatest.FunSuite
21-
import org.scalatest.matchers.ShouldMatchers
21+
import org.scalatest.Matchers
2222

2323
import org.apache.spark.{LocalSparkContext, SparkConf, Success}
2424
import org.apache.spark.executor.{ShuffleReadMetrics, TaskMetrics}
2525
import org.apache.spark.scheduler._
2626
import org.apache.spark.util.Utils
2727

28-
class JobProgressListenerSuite extends FunSuite with LocalSparkContext with ShouldMatchers {
28+
class JobProgressListenerSuite extends FunSuite with LocalSparkContext with Matchers {
2929
test("test LRU eviction of stages") {
3030
val conf = new SparkConf()
3131
conf.set("spark.ui.retainedStages", 5.toString)

0 commit comments

Comments
 (0)