You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "josephC45 (via GitHub)" <gi...@apache.org> on 2025/08/09 16:46:33 UTC
[PR] [#7960] Improvement (core,common): correct parameter order in SqlSessionFactoryHelper and add unit tests for JdbcUrlUtils.validateJdbcConfig [gravitino]
josephC45 opened a new pull request, #8000:
URL: https://github.com/apache/gravitino/pull/8000
### What changes were proposed in this pull request?
Fixes the parameter order when calling JdbcUrlUtils.validateJdbcConfig in SqlSessionFactoryHelper.java. The method now receives driverClass as the first parameter and jdbcUrl as the second, as expected.
Adds comprehensive unit tests in TestJdbcUrlUtils.java covering valid and invalid JDBC configurations.
### Why are the changes needed?
JdbcUrlUtils.validateJdbcConfig validates the JDBC configuration by checking the driver class name and URL for unsafe parameters. Incorrect parameter order caused validation to run against the wrong values, leading to incorrect results. This fix ensures validation logic works as intended and improves test coverage.
Fix: #7960
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Added unit tests for both successful and failure cases in TestJdbcUrlUtils.java. All tests pass.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#7960] Improvement (core,common): correct parameter order in SqlSessionFactoryHelper and add unit tests for JdbcUrlUtils.validateJdbcConfig [gravitino]
Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on PR #8000:
URL: https://github.com/apache/gravitino/pull/8000#issuecomment-3172274198
The CI is failing because TestJdbcUrlUtils.java is misisng an ASF license header.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#7960] Improvement (core,common): correct parameter order in SqlSessionFactoryHelper and add unit tests for JdbcUrlUtils.validateJdbcConfig [gravitino]
Posted by "josephC45 (via GitHub)" <gi...@apache.org>.
josephC45 commented on PR #8000:
URL: https://github.com/apache/gravitino/pull/8000#issuecomment-3172291221
Thank you for letting me know. I went ahead and added the ASF license header to the file in the additional commit above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#7960] Improvement (core,common): correct parameter order in SqlSessionFactoryHelper and add unit tests for JdbcUrlUtils.validateJdbcConfig [gravitino]
Posted by "josephC45 (via GitHub)" <gi...@apache.org>.
josephC45 commented on PR #8000:
URL: https://github.com/apache/gravitino/pull/8000#issuecomment-3177083793
I appreciate the opportunity! I look forward to contributing more!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#7960] Improvement (core,common): correct parameter order in SqlSessionFactoryHelper and add unit tests for JdbcUrlUtils.validateJdbcConfig [gravitino]
Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean merged PR #8000:
URL: https://github.com/apache/gravitino/pull/8000
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org