|
29 | 29 | shift
|
30 | 30 | done
|
31 | 31 |
|
32 |
| -# This bit is properly weird and took me ages to find a workaround. Basically, without a connection |
33 |
| -# to the db in a shell that is kept alive, aggregate functions with nulls behave incorrectly |
34 |
| -# so the AggregateTest.testGroupBy test fails |
35 |
| -db2HackConnection () { |
36 |
| - echo "Starting persistent db2 connection" |
37 |
| - docker exec -i ${CONTAINER_NAME} bash -c "su - db2inst1 -c 'while true; do db2 connect to $DB2NAME && while sleep 65535;do :; done; sleep 5; done'" & |
38 |
| -} |
39 |
| - |
40 | 32 | # sometimes, startup on travis fails, so retry up to 5 times.
|
41 | 33 | for try in 1 2 3 4 5
|
42 | 34 | do
|
|
50 | 42 | elif [ "${CONTAINER_NAME}" = "mssqlslicktest" ]; then
|
51 | 43 | RESULT=$(docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=Freeslick18' -p 1401:1433 --name mssqlslicktest -d microsoft/mssql-server-linux:2017-latest && echo -e "\n${SUCCESS_TOKEN}")
|
52 | 44 | elif [ "${CONTAINER_NAME}" = "db2slick" ]; then
|
53 |
| - RESULT=$(docker run -d -p 50000:50000 --name ${CONTAINER_NAME} -e DB2INST1_PASSWORD=db2inst1-pwd -e LICENSE=accept ibmcom/db2express-c:latest "db2start" && |
| 45 | + RESULT=$(docker run -d -p 50000:50000 --name ${CONTAINER_NAME} -e DB2INST1_PASSWORD=db2inst1-pwd -e DB2INSTANCE=db2inst1 -e DBNAME=${DB2NAME} -e LICENSE=accept --privileged=true ibmcom/db2:latest && |
54 | 46 | # Extract non-free db2 jdbc driver jar
|
55 |
| - docker cp ${CONTAINER_NAME}:/home/db2inst1/sqllib/java/db2jcc4.jar . && |
56 |
| - docker exec -i -u db2inst1 -t ${CONTAINER_NAME} bash -l -c "db2 create database $DB2NAME" && |
| 47 | + docker cp ${CONTAINER_NAME}:/opt/ibm/db2/V11.5/java/db2jcc4.jar . && |
57 | 48 | echo -e "\n${SUCCESS_TOKEN}")
|
58 | 49 | fi
|
59 | 50 | elif [ "$RUNNING" = "false" ]; then
|
|
67 | 58 | if [ "${LAST_LINE}" != "${SUCCESS_TOKEN}" ]; then
|
68 | 59 | echo "Container startup failed. Retry ..."
|
69 | 60 | break
|
70 |
| - elif [ "${CONTAINER_NAME}" = "db2slick" ]; then |
71 |
| - db2HackConnection |
72 | 61 | fi
|
73 | 62 | done
|
74 | 63 | if [ "${LAST_LINE}" = "${SUCCESS_TOKEN}" ]; then
|
|
0 commit comments