Skip to content
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

Fix Deprecated MySQL Class Name #1760

Merged
merged 4 commits into from Aug 25, 2019

Conversation

turackangal
Copy link
Contributor

Fix #1655

@rnorth
Copy link
Member

rnorth commented Aug 23, 2019

Sorry but there is #1645 already - though it looks like you may have seen my review comment there and worked around it.

I'd prefer to keep DB specific code out of JdbcDatabaseContainer. Could we instead put all the discovery of the available driver in getDriverClassName()?

e.g. (quickly written pseudocode):

try {
    Class.forName("com.mysql.cj.jdbc.Driver");
	return "com.mysql.cj.jdbc.Driver";
catch (ClassNotFoundException e) {
	return "com.mysql.jdbc.Driver";
}

Copy link
Member

@rnorth rnorth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @turackangal - that looks good to me!
I don't think it's really practical to add a unit test for this, so I'm happy with this PR as it is.

Closes #1645, #1655

@rnorth rnorth merged commit 43e1f6a into testcontainers:master Aug 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecated MySQL class name is used
2 participants