-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HikariCP config fix #1035
HikariCP config fix #1035
Conversation
@@ -41,7 +43,8 @@ static HikariConfig constructHikariConfig() { | |||
String serverName = ApplicationContext.getProperty("DB_URL", ""); | |||
String dbName = ApplicationContext.getProperty("DB_NAME", ""); | |||
String dbPort = ApplicationContext.getProperty("DB_PORT", ""); | |||
String connectionLifetime = ApplicationContext.getProperty("DB_MAX_LIFETIME", "1800000"); | |||
long connectionLifetime = | |||
parseLong(ApplicationContext.getProperty("DB_MAX_LIFETIME", "1800000")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not static import a method from a class.
parseLong(ApplicationContext.getProperty("DB_MAX_LIFETIME", "1800000")); | |
Long.parseLong(ApplicationContext.getProperty("DB_MAX_LIFETIME", "1800000")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
…Cgov/trusted-intermediary into story/1001/stg-db-connections
shared/src/main/java/gov/hhs/cdc/trustedintermediary/external/HikariConnectionPool.java
Fixed
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, but I would address the CodeQL notice.
Add catch for NumberFormatException Co-Authored-By: jherrflexion <[email protected]>
Refactoring DB_MAX_LIFETIME handling Co-Authored-By: Samuel Aquino <[email protected]>
Add more test cases Co-Authored-By: Samuel Aquino <[email protected]>
Fixed that and added some test coverage with @luis-pabon-tf |
|
Add a PR title
Fixes
maxLifetime
settings for HikariCP.Issue
Add a link to the issue here. Consider using
closing keywords
if the this PR isn't for a story (stories will be closed through different means).
Checklist
Note: You may remove items that are not applicable