Skip to content

Fix postfixOps warnings in the test suite #1323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import java.lang.ref.WeakReference

import scala.collection.mutable.{HashSet, SynchronizedSet}
import scala.language.existentials
import scala.language.postfixOps
import scala.util.Random

import org.scalatest.{BeforeAndAfter, FunSuite}
Expand All @@ -47,6 +46,8 @@ import org.apache.spark.storage.ShuffleIndexBlockId
abstract class ContextCleanerSuiteBase(val shuffleManager: Class[_] = classOf[HashShuffleManager])
extends FunSuite with BeforeAndAfter with LocalSparkContext
{
import scala.language.postfixOps

implicit val defaultTimeout = timeout(10000 millis)
val conf = new SparkConf()
.setMaster("local[2]")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import java.util.concurrent.Semaphore
import scala.concurrent.{Await, TimeoutException}
import scala.concurrent.duration.Duration
import scala.concurrent.ExecutionContext.Implicits.global
import scala.language.postfixOps

import org.scalatest.{BeforeAndAfterAll, FunSuite}
import org.scalatest.concurrent.Timeouts
Expand All @@ -32,6 +31,7 @@ import org.apache.spark.SparkContext._
import org.apache.spark.{SparkContext, SparkException, LocalSparkContext}

class AsyncRDDActionsSuite extends FunSuite with BeforeAndAfterAll with Timeouts {
import scala.language.postfixOps

@transient private var sc: SparkContext = _

Expand Down
2 changes: 1 addition & 1 deletion core/src/test/scala/org/apache/spark/ui/UISuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import java.net.ServerSocket
import javax.servlet.http.HttpServletRequest

import scala.io.Source
import scala.language.postfixOps
import scala.util.{Failure, Success, Try}

import org.eclipse.jetty.server.Server
Expand All @@ -35,6 +34,7 @@ import org.apache.spark.LocalSparkContext._
import scala.xml.Node

class UISuite extends FunSuite {
import scala.language.postfixOps

ignore("basic ui visibility") {
withSpark(new SparkContext("local", "test")) { sc =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package org.apache.spark.streaming
import java.nio.ByteBuffer

import scala.collection.mutable.ArrayBuffer
import scala.language.postfixOps

import org.apache.spark.SparkConf
import org.apache.spark.storage.{StorageLevel, StreamBlockId}
Expand All @@ -32,6 +31,7 @@ import org.scalatest.time.SpanSugar._

/** Testsuite for testing the network receiver behavior */
class NetworkReceiverSuite extends FunSuite with Timeouts {
import scala.language.postfixOps

test("network receiver life cycle") {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package org.apache.spark.streaming
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
import scala.language.postfixOps

import org.apache.spark.storage.StorageLevel
import org.apache.spark.streaming.dstream.DStream
Expand All @@ -33,6 +32,7 @@ import org.scalatest.time.SpanSugar._
import org.apache.spark.Logging

class StreamingListenerSuite extends TestSuiteBase with Matchers {
import scala.language.postfixOps

val input = (1 to 4).map(Seq(_)).toSeq
val operation = (d: DStream[Int]) => d.map(x => x)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
package org.apache.spark.streaming

import scala.io.Source
import scala.language.postfixOps

import org.scalatest.FunSuite
import org.scalatest.concurrent.Eventually._
import org.scalatest.time.SpanSugar._

class UISuite extends FunSuite {
import scala.language.postfixOps

// Ignored: See SPARK-1530
ignore("streaming tab in spark UI") {
Expand Down