Skip to content

Commit

Permalink
[SPARK-27155][TEST] Parameterize Oracle docker image name
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?

Update Oracle docker image name.

## How was this patch tested?

./build/mvn test -Pdocker-integration-tests -pl :spark-docker-integration-tests_2.12

Closes #24086 from lipzhu/SPARK-27155.

Authored-by: Zhu, Lipeng <lipzhu@ebay.com>
Signed-off-by: Sean Owen <sean.owen@databricks.com>
  • Loading branch information
Zhu, Lipeng authored and srowen committed Mar 25, 2019
1 parent 594be7a commit 1f2564d
Showing 1 changed file with 9 additions and 6 deletions.
Expand Up @@ -39,13 +39,16 @@ import org.apache.spark.tags.DockerTest
* while Spark QA test run.
*
* The following would be the steps to test this
* 1. Pull oracle 11g image - docker pull wnameless/oracle-xe-11g
* 2. Start docker - sudo service docker start
* 3. Download oracle 11g driver jar and put it in maven local repo:
* 1. Build Oracle database in Docker, please refer below link about how to.
* https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md
* 2. export ORACLE_DOCKER_IMAGE_NAME=$ORACLE_DOCKER_IMAGE_NAME
* Pull oracle $ORACLE_DOCKER_IMAGE_NAME image - docker pull $ORACLE_DOCKER_IMAGE_NAME
* 3. Start docker - sudo service docker start
* 4. Download oracle 11g driver jar and put it in maven local repo:
* (com/oracle/ojdbc6/11.2.0.2.0/ojdbc6-11.2.0.2.0.jar)
* 4. The timeout and interval parameter to be increased from 60,1 to a high value for oracle test
* 5. The timeout and interval parameter to be increased from 60,1 to a high value for oracle test
* in DockerJDBCIntegrationSuite.scala (Locally tested with 200,200 and executed successfully).
* 5. Run spark test - ./build/sbt "test-only org.apache.spark.sql.jdbc.OracleIntegrationSuite"
* 6. Run spark test - ./build/sbt "test-only org.apache.spark.sql.jdbc.OracleIntegrationSuite"
*
* All tests in this suite are ignored because of the dependency with the oracle jar from maven
* repository.
Expand All @@ -55,7 +58,7 @@ class OracleIntegrationSuite extends DockerJDBCIntegrationSuite with SharedSQLCo
import testImplicits._

override val db = new DatabaseOnDocker {
override val imageName = "wnameless/oracle-xe-11g:16.04"
override val imageName = sys.env("ORACLE_DOCKER_IMAGE_NAME")
override val env = Map(
"ORACLE_ROOT_PASSWORD" -> "oracle"
)
Expand Down

0 comments on commit 1f2564d

Please sign in to comment.