You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sqoop.apache.org by fe...@apache.org on 2019/10/16 12:47:10 UTC
[sqoop] branch trunk updated: SQOOP-3428: Try to fix the CI (#85)
This is an automated email from the ASF dual-hosted git repository.
fero pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/sqoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 875e431 SQOOP-3428: Try to fix the CI (#85)
875e431 is described below
commit 875e431af15c514a6c3dbf30e3afefdf640c66f9
Author: Fokko Driesprong <fo...@apache.org>
AuthorDate: Wed Oct 16 14:47:01 2019 +0200
SQOOP-3428: Try to fix the CI (#85)
---
build.gradle | 3 +--
gradle.properties | 2 +-
.../docker-compose/db2scripts/db2entrypoint.sh | 22 ----------------------
.../sqoop-thirdpartytest-db-services.yml | 8 +++-----
.../apache/sqoop/metastore/JobToolTestBase.java | 4 +---
5 files changed, 6 insertions(+), 33 deletions(-)
diff --git a/build.gradle b/build.gradle
index 02d069e..dd25645 100644
--- a/build.gradle
+++ b/build.gradle
@@ -179,9 +179,8 @@ dependencies {
testCompile group: 'mysql', name: 'mysql-connector-java', version: mySqlConnectorVersion
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: 'com.ibm.db2', name: 'jcc', version: db2JdbcDriverVersion
testCompile group: 'oracle', name: 'ojdbc6', version: oracleJdbcDriverVersion
-
}
task unitTest (type: Test) {
diff --git a/gradle.properties b/gradle.properties
index 025c4cd..56cf303 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -54,7 +54,7 @@ assertjVersion=2.8.0
mySqlConnectorVersion=5.1.47
cubridJdbcDriverVersion=10.1.2.7694
msSqlJdbcDriverVersion=7.0.0.jre8
-db2JdbcDriverVersion=10.1
+db2JdbcDriverVersion=11.5.0.0
oracleJdbcDriverVersion=11.2.0.3
checkstyleVersion=5.5
diff --git a/src/scripts/thirdpartytest/docker-compose/db2scripts/db2entrypoint.sh b/src/scripts/thirdpartytest/docker-compose/db2scripts/db2entrypoint.sh
deleted file mode 100755
index 2397ab8..0000000
--- a/src/scripts/thirdpartytest/docker-compose/db2scripts/db2entrypoint.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set -e
-echo -e "$DB2INST1_PASSWORD\n$DB2INST1_PASSWORD" | passwd db2inst1
-su - db2inst1 -c "db2start;db2 create db SQOOP"
-nohup /usr/sbin/sshd -D 2>&1 > /dev/null &
-while true; do sleep 1000; done
diff --git a/src/scripts/thirdpartytest/docker-compose/sqoop-thirdpartytest-db-services.yml b/src/scripts/thirdpartytest/docker-compose/sqoop-thirdpartytest-db-services.yml
index 0754c9c..3b8690e 100644
--- a/src/scripts/thirdpartytest/docker-compose/sqoop-thirdpartytest-db-services.yml
+++ b/src/scripts/thirdpartytest/docker-compose/sqoop-thirdpartytest-db-services.yml
@@ -110,18 +110,16 @@ services:
timeout: 5s
retries: 50
db2:
- image: ibmcom/db2express-c:10.5.0.5-3.10.0
+ image: ibmcom/db2:11.5.0.0a
container_name: sqoop_db2_container
+ privileged: true
environment:
COMPOSE_HTTP_TIMEOUT: 200
DB2INST1_PASSWORD: Sqoop12345
+ DBNAME: SQOOP
LICENSE: accept
ports:
- 50000:50000
- volumes:
- - ./db2scripts:/home/db2inst1/db2scripts
- entrypoint:
- /home/db2inst1/db2scripts/db2entrypoint.sh
healthcheck:
test: ["CMD", "/home/db2inst1/sqllib/bin/db2", "CONNECT", "TO", "SQOOP"]
interval: 30s
diff --git a/src/test/org/apache/sqoop/metastore/JobToolTestBase.java b/src/test/org/apache/sqoop/metastore/JobToolTestBase.java
index 214063d..141602b 100644
--- a/src/test/org/apache/sqoop/metastore/JobToolTestBase.java
+++ b/src/test/org/apache/sqoop/metastore/JobToolTestBase.java
@@ -70,9 +70,7 @@ public abstract class JobToolTestBase extends BaseSqoopTestCase {
SqoopOptions options = getSqoopOptions();
- Connection conn = getConnection(options);
-
- try {
+ try(Connection conn = getConnection(options)) {
Statement statement = conn.createStatement();
statement.execute("DROP TABLE " + cm.escapeTableName("SQOOP_ROOT"));
statement.execute("DROP TABLE " + cm.escapeTableName("SQOOP_SESSIONS"));