Skip to content

Commit

Permalink
Changed println to log in ThreadingSuite
Browse files Browse the repository at this point in the history
  • Loading branch information
jonalter committed Jul 9, 2015
1 parent 7fcac3e commit ccd44cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/test/scala/org/apache/spark/ThreadingSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ object ThreadingSuiteState {
}
}

class ThreadingSuite extends SparkFunSuite with LocalSparkContext {
class ThreadingSuite extends SparkFunSuite with LocalSparkContext with Logging {

test("accessing SparkContext form a different thread") {
sc = new SparkContext("local", "test")
Expand Down Expand Up @@ -130,8 +130,6 @@ class ThreadingSuite extends SparkFunSuite with LocalSparkContext {
Thread.sleep(100)
}
if (running.get() != 4) {
println("Waited 1 second without seeing runningThreads = 4 (it was " +
running.get() + "); failing test")
ThreadingSuiteState.failed.set(true)
}
number
Expand All @@ -143,6 +141,8 @@ class ThreadingSuite extends SparkFunSuite with LocalSparkContext {
}
sem.acquire(2)
if (ThreadingSuiteState.failed.get()) {
logError("Waited 1 second without seeing runningThreads = 4 (it was " +
ThreadingSuiteState.runningThreads.get() + "); failing test")
fail("One or more threads didn't see runningThreads = 4")
}
}
Expand Down

0 comments on commit ccd44cc

Please sign in to comment.