Skip to content

Commit 81112e4

Browse files
srowenJoshRosen
authored andcommitted
SPARK-4814 [CORE] Enable assertions in SBT, Maven tests / AssertionError from Hive's LazyBinaryInteger
This enables assertions for the Maven and SBT build, but overrides the Hive module to not enable assertions. Author: Sean Owen <[email protected]> Closes apache#3692 from srowen/SPARK-4814 and squashes the following commits: caca704 [Sean Owen] Disable assertions just for Hive f71e783 [Sean Owen] Enable assertions for SBT and Maven build
1 parent 5c24759 commit 81112e4

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@
958958
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
959959
<junitxml>.</junitxml>
960960
<filereports>SparkTestSuite.txt</filereports>
961-
<argLine>-Xmx3g -XX:MaxPermSize=${MaxPermGen} -XX:ReservedCodeCacheSize=512m</argLine>
961+
<argLine>-ea -Xmx3g -XX:MaxPermSize=${MaxPermGen} -XX:ReservedCodeCacheSize=512m</argLine>
962962
<stderr/>
963963
<systemProperties>
964964
<java.awt.headless>true</java.awt.headless>

project/SparkBuild.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ object Hive {
256256

257257
lazy val settings = Seq(
258258
javaOptions += "-XX:MaxPermSize=1g",
259+
// Specially disable assertions since some Hive tests fail them
260+
javaOptions in Test := (javaOptions in Test).value.filterNot(_ == "-ea"),
259261
// Multiple queries rely on the TestHive singleton. See comments there for more details.
260262
parallelExecution in Test := false,
261263
// Supporting all SerDes requires us to depend on deprecated APIs, so we turn off the warnings
@@ -385,6 +387,7 @@ object TestSettings {
385387
javaOptions in Test += "-Dsun.io.serialization.extendedDebugInfo=true",
386388
javaOptions in Test ++= System.getProperties.filter(_._1 startsWith "spark")
387389
.map { case (k,v) => s"-D$k=$v" }.toSeq,
390+
javaOptions in Test += "-ea",
388391
javaOptions in Test ++= "-Xmx3g -XX:PermSize=128M -XX:MaxNewSize=256m -XX:MaxPermSize=1g"
389392
.split(" ").toSeq,
390393
// This places test scope jars on the classpath of executors during tests.

sql/hive/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@
161161
<plugin>
162162
<groupId>org.scalatest</groupId>
163163
<artifactId>scalatest-maven-plugin</artifactId>
164+
<configuration>
165+
<!-- Specially disable assertions since some Hive tests fail them -->
166+
<argLine>-da -Xmx3g -XX:MaxPermSize=${MaxPermGen} -XX:ReservedCodeCacheSize=512m</argLine>
167+
</configuration>
164168
</plugin>
165169
<plugin>
166170
<groupId>org.codehaus.mojo</groupId>

0 commit comments

Comments
 (0)