Skip to content

Commit

Permalink
Use "extraScalaTestArgs" to pass extra options to scalatest. (#52)
Browse files Browse the repository at this point in the history
* Use "extraTestArgLine" to pass extra options to scalatest.

Because the "argLine" option of scalatest is set in pom.xml and we can't
overwrite it from the command line.

Ref apache-spark-on-k8s#37

* Added a default value for extraTestArgLine

* Use a better name.

* Added a tip for this in the dev docs.
  • Loading branch information
lins05 authored and ash211 committed Mar 8, 2017
1 parent 27f3005 commit 48f5884
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@
<PermGen>64m</PermGen>
<MaxPermGen>512m</MaxPermGen>
<CodeCacheSize>512m</CodeCacheSize>
<extraScalaTestArgs></extraScalaTestArgs>
</properties>
<repositories>
<repository>
Expand Down Expand Up @@ -2085,7 +2086,7 @@
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<junitxml>.</junitxml>
<filereports>SparkTestSuite.txt</filereports>
<argLine>-ea -Xmx3g -XX:MaxPermSize=${MaxPermGen} -XX:ReservedCodeCacheSize=${CodeCacheSize}</argLine>
<argLine>-ea -Xmx3g -XX:MaxPermSize=${MaxPermGen} -XX:ReservedCodeCacheSize=${CodeCacheSize} ${extraScalaTestArgs}</argLine>
<stderr/>
<environmentVariables>
<!--
Expand Down
14 changes: 14 additions & 0 deletions resource-managers/kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ Afterwards, the integration tests can be executed with Maven or your IDE. Note t
`pre-integration-test` phase must be run every time the Spark main code changes. When running tests from the
command line, the `pre-integration-test` phase should automatically be invoked if the `integration-test` phase is run.

# Preserve the Minikube VM

The integration tests make use of [Minikube](https://github.com/kubernetes/minikube), which fires up a virtual machine
and setup a single-node kubernetes cluster within it. By default the vm is destroyed after the tests are finished.
If you want to preserve the vm, e.g. to reduce the running time of tests during development, you can pass the property
`spark.docker.test.persistMinikube` to the test process:

```sh
build/mvn integration-test \
-Pkubernetes -Pkubernetes-integration-tests \
-pl resource-managers/kubernetes/integration-tests -am \
-DextraScalaTestArgs=-Dspark.docker.test.persistMinikube=true
```

# Usage Guide

See the [usage guide](../../docs/running-on-kubernetes.md) for more information.

0 comments on commit 48f5884

Please sign in to comment.