Skip to content

Commit 8bde735

Browse files
authored
Merge pull request #1459 from tsegismont/re-enable-mssql-ci-4x
Re-enable MSSQL in CI (4.x)
2 parents d08f374 + 7e78b12 commit 8bde735

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

.github/workflows/ci-4.x.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest]
19-
# profile: [PostgreSQL-9,PostgreSQL-10,PostgreSQL-11,MySQL-8.0,MySQL-5.6,MySQL-5.7,MariaDB-10.4,MSSQL-2017-latest,MSSQL-2019-latest,DB2-11.5,Oracle-23,SQL-templates]
20-
# Removed MSSQL that fails in CI docker
21-
profile: [PostgreSQL-9,PostgreSQL-10,PostgreSQL-11,MySQL-8.0,MySQL-5.6,MySQL-5.7,MariaDB-10.4,DB2-11.5,Oracle-23,SQL-templates]
19+
profile: [PostgreSQL-9,PostgreSQL-10,PostgreSQL-11,MySQL-8.0,MySQL-5.6,MySQL-5.7,MariaDB-10.4,MSSQL-2017-latest,MSSQL-2019-latest,DB2-11.5,Oracle-23,SQL-templates]
2220
jdk: [8, 17]
2321
exclude:
2422
- profile: Oracle-23

vertx-mssql-client/docker/docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ services:
1010
TZ: UTC
1111
SA_PASSWORD: A_Str0ng_Required_Password
1212
test-mssql-initdb:
13-
image: mcr.microsoft.com/mssql-tools
13+
image: mcr.microsoft.com/mssql/server:${MSSQL_VERSION:-2019-latest}
1414
depends_on:
1515
- "test-mssql"
16-
command: [ "sh", "/opt/mssql-tools/bin/initdb.sh","test-mssql,1433","A_Str0ng_Required_Password","/opt/data/init.sql" ]
16+
command: [ "sh", "/opt/mssql-tools18/bin/initdb.sh","test-mssql,1433","A_Str0ng_Required_Password","/opt/data/init.sql" ]
1717
volumes:
1818
- type: bind
1919
source: ./initdb.sh
20-
target: /opt/mssql-tools/bin/initdb.sh
20+
target: /opt/mssql-tools18/bin/initdb.sh
2121
read_only: true
2222
- type: bind
2323
source: ../src/test/resources/init.sql

vertx-mssql-client/docker/initdb.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ SERVER="$1"
66
PASSWORD="$2"
77
SQL_FILE="$3"
88

9-
until /opt/mssql-tools/bin/sqlcmd -l 1 -S $SERVER -U SA -P $PASSWORD -q "SELECT 1"; do
9+
until /opt/mssql-tools18/bin/sqlcmd -l 1 -S $SERVER -U SA -P $PASSWORD -C -No -q "SELECT 1"; do
1010
>&2 echo "MSSQL is unavailable - sleeping"
1111
sleep 1
1212
done
1313

1414
>&2 echo "MSSQL is up - executing command"
15-
/opt/mssql-tools/bin/sqlcmd -S $SERVER -U SA -P $PASSWORD -i $SQL_FILE
15+
/opt/mssql-tools18/bin/sqlcmd -S $SERVER -U SA -P $PASSWORD -i $SQL_FILE -C -No

vertx-mssql-client/src/test/java/io/vertx/mssqlclient/junit/MSSQLRule.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,12 @@ private MSSQLConnectOptions startMSSQL() throws IOException {
115115
private void initDb() throws IOException {
116116
try {
117117
ExecResult execResult = server.execInContainer(
118-
"/opt/mssql-tools/bin/sqlcmd",
118+
"/opt/mssql-tools18/bin/sqlcmd",
119119
"-S", "localhost",
120120
"-U", USER,
121121
"-P", PASSWORD,
122-
"-i", INIT_SQL
122+
"-i", INIT_SQL,
123+
"-C", "-No"
123124
);
124125
if (execResult.getExitCode() != 0) {
125126
throw new RuntimeException(String.format("Failure while initializing database%nstdout:%s%nstderr:%s%n", execResult.getStdout(), execResult.getStderr()));

0 commit comments

Comments
 (0)