diff --git a/.github/workflows/reusable-revised-its.yml b/.github/workflows/reusable-revised-its.yml
index 26c045fb86f..326ce857197 100644
--- a/.github/workflows/reusable-revised-its.yml
+++ b/.github/workflows/reusable-revised-its.yml
@@ -37,8 +37,14 @@ on:
description: 'IT test Category'
required: true
type: string
+ mysql_driver:
+ description: 'MySQL driver to use'
+ required: false
+ type: string
+ default: com.mysql.jdbc.Driver
env:
+ MYSQL_DRIVER_CLASSNAME: ${{ inputs.mysql_driver }} # Used by tests to connect to metadata store directly.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
jobs:
diff --git a/.github/workflows/revised-its.yml b/.github/workflows/revised-its.yml
index f581d4c7272..afed291d798 100644
--- a/.github/workflows/revised-its.yml
+++ b/.github/workflows/revised-its.yml
@@ -34,3 +34,4 @@ jobs:
use_indexer: ${{ matrix.indexer }}
script: ./it.sh github ${{ matrix.it }}
it: ${{ matrix.it }}
+ mysql_driver: com.mysql.jdbc.Driver
diff --git a/.github/workflows/unit-and-integration-tests-unified.yml b/.github/workflows/unit-and-integration-tests-unified.yml
index 5d79f5ef03f..f4cada6d4e4 100644
--- a/.github/workflows/unit-and-integration-tests-unified.yml
+++ b/.github/workflows/unit-and-integration-tests-unified.yml
@@ -29,6 +29,7 @@ concurrency:
cancel-in-progress: true
env:
+ MYSQL_DRIVER_CLASSNAME: com.mysql.jdbc.Driver # Used to set druid config in docker image for revised ITs
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
jobs:
diff --git a/integration-tests-ex/cases/pom.xml b/integration-tests-ex/cases/pom.xml
index 9a255188a6d..4c8571f2ac2 100644
--- a/integration-tests-ex/cases/pom.xml
+++ b/integration-tests-ex/cases/pom.xml
@@ -202,12 +202,19 @@
${com.google.apis.client.version}
provided
+
mysql
mysql-connector-java
${mysql.version}
runtime
+
+ org.mariadb.jdbc
+ mariadb-java-client
+ ${mariadb.version}
+ runtime
+
org.jdbi
jdbi
diff --git a/integration-tests-ex/cases/src/test/java/org/apache/druid/testsEx/config/Initializer.java b/integration-tests-ex/cases/src/test/java/org/apache/druid/testsEx/config/Initializer.java
index ebd4e003ce0..80d1dec0e66 100644
--- a/integration-tests-ex/cases/src/test/java/org/apache/druid/testsEx/config/Initializer.java
+++ b/integration-tests-ex/cases/src/test/java/org/apache/druid/testsEx/config/Initializer.java
@@ -275,6 +275,7 @@ public class Initializer
property("druid.client.https.certAlias", "druid");
property("druid.client.https.keyManagerPassword", "druid123");
property("druid.client.https.keyStorePassword", "druid123");
+ propertyEnvVarBinding("druid.metadata.mysql.driver.driverClassName", "MYSQL_DRIVER_CLASSNAME");
// More env var bindings for properties formerly passed in via
// a generated config file.
diff --git a/integration-tests-ex/image/docker/launch.sh b/integration-tests-ex/image/docker/launch.sh
index 1f64b4e14df..8116ab96323 100644
--- a/integration-tests-ex/image/docker/launch.sh
+++ b/integration-tests-ex/image/docker/launch.sh
@@ -41,6 +41,9 @@ cd /
# Test-specific way to define extensions. Compose defines two test-specific
# variables. We combine these to create the final form converted to a property.
+if [ -n "$MYSQL_DRIVER_CLASSNAME" ]; then
+ export druid_metadata_mysql_driver_driverClassName="$MYSQL_DRIVER_CLASSNAME"
+fi
if [ -n "$druid_extensions_loadList" ]; then
echo "Using the provided druid_extensions_loadList=$druid_extensions_loadList"
else
diff --git a/integration-tests-ex/image/pom.xml b/integration-tests-ex/image/pom.xml
index 2fbeba3935a..be6f8970a87 100644
--- a/integration-tests-ex/image/pom.xml
+++ b/integration-tests-ex/image/pom.xml
@@ -202,7 +202,6 @@ Reference: https://dzone.com/articles/build-docker-image-from-maven
${mysql.version}
${mariadb.version}
- com.mysql.jdbc.Driver
${mysql.image.version}
${confluent-version}
${apache.kafka.version}