4cba6eb420
This PR: - Reenables `surefire`, and copies config from `scalatest` (which is itself an old fork of `surefire`, so similar) - Tells `surefire` to test only Java tests - Enables `surefire` and `scalatest` for all children, and in turn eliminates some duplication. For me this causes the Scala and Java tests to be run once each, it seems, as desired. It doesn't affect the SBT build but works for Maven. I still need to verify that all of the Scala tests and Java tests are being run. Author: Sean Owen <sowen@cloudera.com> Closes #3651 from srowen/SPARK-4159 and squashes the following commits: 2e8a0af [Sean Owen] Remove specialized SPARK_HOME setting for REPL, YARN tests as it appears to be obsolete 12e4558 [Sean Owen] Append to unit-test.log instead of overwriting, so that both surefire and scalatest output is preserved. Also standardize/correct comments a bit. e6f8601 [Sean Owen] Reenable Java tests by reenabling surefire with config cloned from scalatest; centralize test config in the parent |
||
---|---|---|
.. | ||
src/test | ||
README.md | ||
pom.xml |
README.md
Java 8 Test Suites
These tests require having Java 8 installed and are isolated from the main Spark build. If Java 8 is not your system's default Java version, you will need to point Spark's build to your Java location. The set-up depends a bit on the build system:
-
Sbt users can either set JAVA_HOME to the location of a Java 8 JDK or explicitly pass
-java-home
to the sbt launch script. If a Java 8 JDK is detected sbt will automatically include the Java 8 test project.$ JAVA_HOME=/opt/jdk1.8.0/ build/sbt clean "test-only org.apache.spark.Java8APISuite"
-
For Maven users,
Maven users can also refer to their Java 8 directory using JAVA_HOME. However, Maven will not automatically detect the presence of a Java 8 JDK, so a special build profile
-Pjava8-tests
must be used.$ JAVA_HOME=/opt/jdk1.8.0/ mvn clean install -DskipTests
$ JAVA_HOME=/opt/jdk1.8.0/ mvn test -Pjava8-tests -DwildcardSuites=org.apache.spark.Java8APISuite
Note that the above command can only be run from project root directory since this module depends on core and the test-jars of core and streaming. This means an install step is required to make the test dependencies visible to the Java 8 sub-project.