5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-01 22:43:09 +08:00

SQOOP-3417: Execute Oracle XE tests on Travis CI

(Szabolcs Vasas via Fero Szabo)

This closes #65
This commit is contained in:
Fero Szabo 2018-12-04 15:30:16 +01:00
parent 3c1fb870e2
commit 302674d96b
4 changed files with 12 additions and 20 deletions

View File

@ -58,21 +58,11 @@ before_install:
sleep 60;
elif [ "$TEST_TASK" = "oracleXeTest" ];
then
if [ -n "$ORACLE_DRIVER_URL" ];
then
mkdir -p drivers;
wget -q $ORACLE_DRIVER_URL --output-document ./drivers/oracledriver.jar;
./src/scripts/thirdpartytest/start-thirdpartytest-db-containers.sh oracle;
sleep 90;
fi
./src/scripts/thirdpartytest/start-thirdpartytest-db-containers.sh oracle;
sleep 90;
fi
script:
- if [ "$TEST_TASK" != "oracleXeTest" ] || [ -n "$ORACLE_DRIVER_URL" ];
then
./gradlew -Dsqoop.thirdparty.lib.dir=./drivers $TEST_TASK;
else
echo 'Skipping Oracle XE test execution because ORACLE_DRIVER_URL is not set.';
fi
- ./gradlew $TEST_TASK;
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

View File

@ -420,7 +420,7 @@ or
thirdPartyTest
----
Gradle is able download all of the necessary drivers except the Oracle one but the Ant build has to be provided
Gradle is able download all of the necessary drivers but the Ant build has to be provided
with the drivers for all the databases.
Please note that even if you do not need to install RDBMSs to run Sqoop third party tests against the Docker containers you still need to install the following tools:
@ -640,7 +640,3 @@ The steps for setting up the CI job are the following:
The Travis CI job uses Gradle to build and test the project and it is able to execute all of the tests except the
ones requiring an Oracle EE database.
Note that by default the Oracle XE tests are also disabled because the necessary +ojdbc6.jar+ is not publicly available.
Contributors have to upload +ojdbc6.jar+ to a public drive and make it available to the CI job by setting
the +ORACLE_DRIVER_URL+ environment variable in Travis (for more information see Travis
https://docs.travis-ci.com/user/environment-variables/#defining-variables-in-repository-settings[documentation]).

View File

@ -46,6 +46,11 @@ repositories {
maven {
url 'https://artifacts.alfresco.com/nexus/content/repositories/public/'
}
// Oracle driver repository
maven {
url 'http://www.datanucleus.org/downloads/maven2/'
}
}
sourceSets {
@ -104,12 +109,10 @@ configurations.all {
exclude group: 'org.apache.hadoop', module: 'avro'
}
def sqoopThirdPartyLib = System.getProperty("sqoop.thirdparty.lib.dir")
def forkEveryDefault = Integer.valueOf(System.getProperty("forkEvery.default", "0"))
def ignoreTestFailures = Boolean.getBoolean("ignoreTestFailures")
dependencies {
if (sqoopThirdPartyLib != null) runtime fileTree(dir: sqoopThirdPartyLib, include: '*.jar')
compile group: 'org.apache.hadoop', name: 'hadoop-aws', version: hadoopVersion
compile (group: 'org.apache.hadoop', name: 'hadoop-common', version: hadoopVersion) {
exclude group: "asm", module: "asm"
@ -177,6 +180,8 @@ dependencies {
testCompile group: 'cubrid', name: 'cubrid-jdbc', version: cubridJdbcDriverVersion
testCompile group: 'com.microsoft.sqlserver', name: 'mssql-jdbc', version: msSqlJdbcDriverVersion
testCompile group: 'com.ibm.db2.jcc', name: 'db2jcc4', version: db2JdbcDriverVersion
testCompile group: 'oracle', name: 'ojdbc6', version: oracleJdbcDriverVersion
}
task unitTest (type: Test) {

View File

@ -55,6 +55,7 @@ mySqlConnectorVersion=5.1.47
cubridJdbcDriverVersion=10.1.2.7694
msSqlJdbcDriverVersion=7.0.0.jre8
db2JdbcDriverVersion=10.1
oracleJdbcDriverVersion=11.2.0.3
checkstyleVersion=5.5