Skip to content

Commit

Permalink
feat(jdbc/mysql-j-8): Add native image support for jdbc/mysql-j-8 (#966)
Browse files Browse the repository at this point in the history
* fix(jdbc/mysql-j-5): testing native image support for jdbc/mysql-j-5 module

* Update run_tests_graalvm_native.sh

* register resource

* rename resource file path to follow convention

* bring back jdbc/postgresql

* add configs to CloudSqlFeature

* fix formatting

Co-authored-by: Shubha Rajan <shubhadayini@google.com>
  • Loading branch information
mpeddada1 and shubha-rajan authored Sep 8, 2022
1 parent d7dadb5 commit 15e01f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .kokoro/tests/run_tests_graalvm_native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ declare -i return_code=0
# jdbc/mysql-j-5 jdbc/mysql-j-8 jdbc/sqlserver r2dbc/sqlserver r2dbc/sqlserver
# r2dbc/mysql
# https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/issues/824
for test_directory in jdbc/postgres; do
for test_directory in jdbc/postgres jdbc/mysql-j-8; do
pushd ${test_directory}
echo -e "******************** Running tests in ${test_directory} ********************\n"
# Dependency convergence enforcer rule would fail with the junit dependencies
Expand All @@ -56,4 +56,4 @@ for test_directory in jdbc/postgres; do
echo -e "******************** Tests complete in ${test_directory}, result: $result ********************\n"
popd
done
exit ${return_code}
exit ${return_code}
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ public void beforeAnalysis(BeforeAnalysisAccess access) {

NativeImageUtils.registerConstructorsForReflection(
access, "com.mysql.cj.conf.url.SingleConnectionUrl");
resourcesRegistry.addResources(ConfigurationCondition.alwaysTrue(),
"\\Qcom/mysql/cj/util/TimeZoneMapping.properties\\E");

// for mysql-j-5
NativeImageUtils.registerConstructorsForReflection(
Expand Down

0 comments on commit 15e01f4

Please sign in to comment.