Skip to content

Commit

Permalink
LIVY-219. Follow-up. Disabled JobApiIT.run scala jobs in Scala 2.11…
Browse files Browse the repository at this point in the history
… test run. (#216)

Skip integration test `JobApiIT.run scala jobs` in Scala 2.11 test run because the job is compiled in Scala 2.10.
  • Loading branch information
jerryshao authored and alex-the-man committed Nov 19, 2016
1 parent fe92868 commit b8a0839
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
14 changes: 4 additions & 10 deletions integration-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,31 +167,25 @@
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_${scala.binary.version}</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_${scala.binary.version}</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming_${scala.binary.version}</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-hive_${scala.binary.version}</artifactId>
</dependency>

<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-repl_${scala.binary.version}</artifactId>
</dependency>

<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-yarn_${scala.binary.version}</artifactId>
<scope>test</scope>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import java.util.concurrent.{Future => JFuture, TimeUnit}
import javax.servlet.http.HttpServletResponse

import scala.collection.JavaConverters._
import scala.util.Try
import scala.util.{Properties, Try}

import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.scala.DefaultScalaModule
Expand All @@ -37,6 +37,7 @@ import com.cloudera.livy.client.common.HttpMessages._
import com.cloudera.livy.sessions.SessionKindModule
import com.cloudera.livy.test.framework.BaseIntegrationTestSuite
import com.cloudera.livy.test.jobs._
import com.cloudera.livy.utils.LivySparkUtils

// Proper type representing the return value of "GET /sessions". At some point we should make
// SessionServlet use something like this.
Expand Down Expand Up @@ -157,7 +158,7 @@ class JobApiIT extends BaseIntegrationTestSuite with BeforeAndAfterAll with Logg
assert(result === "hello")
}

test("run scala jobs") {
scalaTest("run scala jobs") {
assume(client2 != null, "Client not active.")

val jobs = Seq(
Expand All @@ -175,6 +176,15 @@ class JobApiIT extends BaseIntegrationTestSuite with BeforeAndAfterAll with Logg
}
}

protected def scalaTest(desc: String)(testFn: => Unit): Unit = {
test(desc) {
assume(sys.env("LIVY_SPARK_SCALA_VERSION") ==
LivySparkUtils.formatScalaVersion(Properties.versionNumberString),
s"Scala test can only be run with ${Properties.versionString}")
testFn
}
}

test("ensure failing jobs do not affect session state") {
assume(client2 != null, "Client not active.")

Expand Down

0 comments on commit b8a0839

Please sign in to comment.