Skip to content

Commit bfe74b3

Browse files
author
Andrew Or
committed
[SPARK-7558] Demarcate tests in unit-tests.log (1.4)
This includes the following commits: original: 9eb222c hotfix1: 8c99793 hotfix2: a4f2412 scalastyle check: 609c492 --- Original patch #6441 Branch-1.3 patch #6602 Author: Andrew Or <andrew@databricks.com> Closes #6598 from andrewor14/demarcate-tests-1.4 and squashes the following commits: 4c3c566 [Andrew Or] Merge branch 'branch-1.4' of github.com:apache/spark into demarcate-tests-1.4 e217b78 [Andrew Or] [SPARK-7558] Guard against direct uses of FunSuite / FunSuiteLike 46d4361 [Andrew Or] Various whitespace changes (minor) 3d9bf04 [Andrew Or] Make all test suites extend SparkFunSuite instead of FunSuite eaa520e [Andrew Or] Fix tests? b4d93de [Andrew Or] Fix tests 634a777 [Andrew Or] Fix log message a932e8d [Andrew Or] Fix manual things that cannot be covered through automation 8bc355d [Andrew Or] Add core tests as dependencies in all modules 75d361f [Andrew Or] Introduce base abstract class for all test suites
1 parent 584a2ba commit bfe74b3

File tree

367 files changed

+980
-969
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

367 files changed

+980
-969
lines changed

bagel/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@
4040
<artifactId>spark-core_${scala.binary.version}</artifactId>
4141
<version>${project.version}</version>
4242
</dependency>
43+
<dependency>
44+
<groupId>org.apache.spark</groupId>
45+
<artifactId>spark-core_${scala.binary.version}</artifactId>
46+
<version>${project.version}</version>
47+
<type>test-jar</type>
48+
<scope>test</scope>
49+
</dependency>
4350
<dependency>
4451
<groupId>org.scalacheck</groupId>
4552
<artifactId>scalacheck_${scala.binary.version}</artifactId>

bagel/src/test/scala/org/apache/spark/bagel/BagelSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
package org.apache.spark.bagel
1919

20-
import org.scalatest.{BeforeAndAfter, FunSuite, Assertions}
20+
import org.scalatest.{BeforeAndAfter, Assertions}
2121
import org.scalatest.concurrent.Timeouts
2222
import org.scalatest.time.SpanSugar._
2323

@@ -27,7 +27,7 @@ import org.apache.spark.storage.StorageLevel
2727
class TestVertex(val active: Boolean, val age: Int) extends Vertex with Serializable
2828
class TestMessage(val targetId: String) extends Message[String] with Serializable
2929

30-
class BagelSuite extends FunSuite with Assertions with BeforeAndAfter with Timeouts {
30+
class BagelSuite extends SparkFunSuite with Assertions with BeforeAndAfter with Timeouts {
3131

3232
var sc: SparkContext = _
3333

core/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,12 @@
338338
<dependency>
339339
<groupId>org.seleniumhq.selenium</groupId>
340340
<artifactId>selenium-java</artifactId>
341+
<exclusions>
342+
<exclusion>
343+
<groupId>com.google.guava</groupId>
344+
<artifactId>guava</artifactId>
345+
</exclusion>
346+
</exclusions>
341347
<scope>test</scope>
342348
</dependency>
343349
<!-- Added for selenium: -->

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

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

23-
import org.scalatest.FunSuite
2423
import org.scalatest.Matchers
2524

2625

27-
class AccumulatorSuite extends FunSuite with Matchers with LocalSparkContext {
26+
class AccumulatorSuite extends SparkFunSuite with Matchers with LocalSparkContext {
2827

2928

3029
implicit def setAccum[A]: AccumulableParam[mutable.Set[A], A] =

core/src/test/scala/org/apache/spark/CacheManagerSuite.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.mockito.Mockito._
21-
import org.scalatest.{BeforeAndAfter, FunSuite}
21+
import org.scalatest.BeforeAndAfter
2222
import org.scalatest.mock.MockitoSugar
2323

2424
import org.apache.spark.executor.DataReadMethod
2525
import org.apache.spark.rdd.RDD
2626
import org.apache.spark.storage._
2727

2828
// TODO: Test the CacheManager's thread-safety aspects
29-
class CacheManagerSuite extends FunSuite with LocalSparkContext with BeforeAndAfter
29+
class CacheManagerSuite extends SparkFunSuite with LocalSparkContext with BeforeAndAfter
3030
with MockitoSugar {
3131

3232
var blockManager: BlockManager = _

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@ import java.io.File
2121

2222
import scala.reflect.ClassTag
2323

24-
import org.scalatest.FunSuite
25-
2624
import org.apache.spark.rdd._
2725
import org.apache.spark.storage.{BlockId, StorageLevel, TestBlockId}
2826
import org.apache.spark.util.Utils
2927

30-
class CheckpointSuite extends FunSuite with LocalSparkContext with Logging {
28+
class CheckpointSuite extends SparkFunSuite with LocalSparkContext with Logging {
3129
var checkpointDir: File = _
3230
val partitioner = new HashPartitioner(2)
3331

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import scala.collection.mutable.{HashSet, SynchronizedSet}
2323
import scala.language.existentials
2424
import scala.util.Random
2525

26-
import org.scalatest.{BeforeAndAfter, FunSuite}
26+
import org.scalatest.BeforeAndAfter
2727
import org.scalatest.concurrent.{PatienceConfiguration, Eventually}
2828
import org.scalatest.concurrent.Eventually._
2929
import org.scalatest.time.SpanSugar._
@@ -44,7 +44,7 @@ import org.apache.spark.storage.ShuffleIndexBlockId
4444
* config options, in particular, a different shuffle manager class
4545
*/
4646
abstract class ContextCleanerSuiteBase(val shuffleManager: Class[_] = classOf[HashShuffleManager])
47-
extends FunSuite with BeforeAndAfter with LocalSparkContext
47+
extends SparkFunSuite with BeforeAndAfter with LocalSparkContext
4848
{
4949
implicit val defaultTimeout = timeout(10000 millis)
5050
val conf = new SparkConf()

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
package org.apache.spark
1919

20-
import org.scalatest.FunSuite
2120
import org.scalatest.concurrent.Timeouts._
2221
import org.scalatest.Matchers
2322
import org.scalatest.time.{Millis, Span}
@@ -28,7 +27,7 @@ class NotSerializableClass
2827
class NotSerializableExn(val notSer: NotSerializableClass) extends Throwable() {}
2928

3029

31-
class DistributedSuite extends FunSuite with Matchers with LocalSparkContext {
30+
class DistributedSuite extends SparkFunSuite with Matchers with LocalSparkContext {
3231

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

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@ package org.apache.spark
1919

2020
import java.io.File
2121

22-
import org.scalatest.FunSuite
2322
import org.scalatest.concurrent.Timeouts
2423
import org.scalatest.prop.TableDrivenPropertyChecks._
2524
import org.scalatest.time.SpanSugar._
2625

2726
import org.apache.spark.util.Utils
2827

29-
class DriverSuite extends FunSuite with Timeouts {
28+
class DriverSuite extends SparkFunSuite with Timeouts {
3029

3130
ignore("driver should exit after finishing without cleanup (SPARK-530)") {
3231
val sparkHome = sys.props.getOrElse("spark.test.home", fail("spark.test.home is not set!"))

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package org.apache.spark
1919

2020
import scala.collection.mutable
2121

22-
import org.scalatest.{BeforeAndAfter, FunSuite, PrivateMethodTester}
22+
import org.scalatest.{BeforeAndAfter, PrivateMethodTester}
2323
import org.apache.spark.executor.TaskMetrics
2424
import org.apache.spark.scheduler._
2525
import org.apache.spark.scheduler.cluster.ExecutorInfo
@@ -28,7 +28,11 @@ import org.apache.spark.util.ManualClock
2828
/**
2929
* Test add and remove behavior of ExecutorAllocationManager.
3030
*/
31-
class ExecutorAllocationManagerSuite extends FunSuite with LocalSparkContext with BeforeAndAfter {
31+
class ExecutorAllocationManagerSuite
32+
extends SparkFunSuite
33+
with LocalSparkContext
34+
with BeforeAndAfter {
35+
3236
import ExecutorAllocationManager._
3337
import ExecutorAllocationManagerSuite._
3438

0 commit comments

Comments
 (0)