Skip to content

Commit 2b94b19

Browse files
lins05Puneet Loya
authored andcommitted
Use "extraScalaTestArgs" to pass extra options to scalatest. (apache-spark-on-k8s#52)
* 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.
1 parent a5be146 commit 2b94b19

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@
218218
<spark.test.home>${session.executionRootDirectory}</spark.test.home>
219219

220220
<CodeCacheSize>512m</CodeCacheSize>
221+
<extraScalaTestArgs></extraScalaTestArgs>
221222
</properties>
222223
<repositories>
223224
<repository>
@@ -2682,7 +2683,6 @@
26822683
</plugins>
26832684
</build>
26842685
</profile>
2685-
26862686
<!--
26872687
This is a profile to enable the use of the ASF snapshot and staging repositories
26882688
during a build. It is useful when testing againt nightly or RC releases of dependencies.

resource-managers/kubernetes/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@ Afterwards, the integration tests can be executed with Maven or your IDE. Note t
5151
`pre-integration-test` phase must be run every time the Spark main code changes. When running tests from the
5252
command line, the `pre-integration-test` phase should automatically be invoked if the `integration-test` phase is run.
5353

54+
# Preserve the Minikube VM
55+
56+
The integration tests make use of [Minikube](https://github.com/kubernetes/minikube), which fires up a virtual machine
57+
and setup a single-node kubernetes cluster within it. By default the vm is destroyed after the tests are finished.
58+
If you want to preserve the vm, e.g. to reduce the running time of tests during development, you can pass the property
59+
`spark.docker.test.persistMinikube` to the test process:
60+
61+
```sh
62+
build/mvn integration-test \
63+
-Pkubernetes -Pkubernetes-integration-tests \
64+
-pl resource-managers/kubernetes/integration-tests -am \
65+
-DextraScalaTestArgs=-Dspark.docker.test.persistMinikube=true
66+
```
67+
5468
# Usage Guide
5569

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

0 commit comments

Comments
 (0)