Skip to content

Commit 1f2564d

Browse files
zhulipengsrowen
authored andcommitted
[SPARK-27155][TEST] Parameterize Oracle docker image name
## 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 apache#24086 from lipzhu/SPARK-27155. Authored-by: Zhu, Lipeng <[email protected]> Signed-off-by: Sean Owen <[email protected]>
1 parent 594be7a commit 1f2564d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/OracleIntegrationSuite.scala

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,16 @@ import org.apache.spark.tags.DockerTest
3939
* while Spark QA test run.
4040
*
4141
* The following would be the steps to test this
42-
* 1. Pull oracle 11g image - docker pull wnameless/oracle-xe-11g
43-
* 2. Start docker - sudo service docker start
44-
* 3. Download oracle 11g driver jar and put it in maven local repo:
42+
* 1. Build Oracle database in Docker, please refer below link about how to.
43+
* https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md
44+
* 2. export ORACLE_DOCKER_IMAGE_NAME=$ORACLE_DOCKER_IMAGE_NAME
45+
* Pull oracle $ORACLE_DOCKER_IMAGE_NAME image - docker pull $ORACLE_DOCKER_IMAGE_NAME
46+
* 3. Start docker - sudo service docker start
47+
* 4. Download oracle 11g driver jar and put it in maven local repo:
4548
* (com/oracle/ojdbc6/11.2.0.2.0/ojdbc6-11.2.0.2.0.jar)
46-
* 4. The timeout and interval parameter to be increased from 60,1 to a high value for oracle test
49+
* 5. The timeout and interval parameter to be increased from 60,1 to a high value for oracle test
4750
* in DockerJDBCIntegrationSuite.scala (Locally tested with 200,200 and executed successfully).
48-
* 5. Run spark test - ./build/sbt "test-only org.apache.spark.sql.jdbc.OracleIntegrationSuite"
51+
* 6. Run spark test - ./build/sbt "test-only org.apache.spark.sql.jdbc.OracleIntegrationSuite"
4952
*
5053
* All tests in this suite are ignored because of the dependency with the oracle jar from maven
5154
* repository.
@@ -55,7 +58,7 @@ class OracleIntegrationSuite extends DockerJDBCIntegrationSuite with SharedSQLCo
5558
import testImplicits._
5659

5760
override val db = new DatabaseOnDocker {
58-
override val imageName = "wnameless/oracle-xe-11g:16.04"
61+
override val imageName = sys.env("ORACLE_DOCKER_IMAGE_NAME")
5962
override val env = Map(
6063
"ORACLE_ROOT_PASSWORD" -> "oracle"
6164
)

0 commit comments

Comments
 (0)