Skip to content

Fix Deprecated MySQL Class Name#1760

Merged
rnorth merged 4 commits intotestcontainers:masterfrom
turackangal:deprecated-mysql-name
Aug 25, 2019
Merged

Fix Deprecated MySQL Class Name#1760
rnorth merged 4 commits intotestcontainers:masterfrom
turackangal:deprecated-mysql-name

Conversation

@turackangal
Copy link
Copy Markdown
Contributor

Fix #1655

@rnorth
Copy link
Copy Markdown
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
Copy Markdown
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