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

Use testcontainers for MySQL instead of mysql-connector-mxj #957

Conversation

KushalP
Copy link
Contributor

@KushalP KushalP commented Jun 15, 2020

The mxj library is flaky and doesn't work on various platforms due to being outdated.

This PR is related to #894 and #947.

@KushalP

This comment has been minimized.

@KushalP KushalP changed the title User testcontainers for MySQL instead of mysql-connector-mxj Use testcontainers for MySQL instead of mysql-connector-mxj Jun 15, 2020
@KushalP KushalP force-pushed the nj-use-testcontainers-for-mysql-insteado-of-mxj branch from aee667d to 44b662b Compare June 15, 2020 20:33
@KushalP KushalP marked this pull request as draft June 15, 2020 20:34
@KushalP

This comment has been minimized.

@Tapac
Copy link
Contributor

Tapac commented Jun 21, 2020

Could you please run tests with Java8 as gradle JDK?

@Tapac
Copy link
Contributor

Tapac commented Jun 21, 2020

Should be fixed in master, please check.

@KushalP KushalP force-pushed the nj-use-testcontainers-for-mysql-insteado-of-mxj branch from 44b662b to 7ee4f64 Compare June 22, 2020 08:27
@KushalP KushalP marked this pull request as ready for review June 22, 2020 08:33
@KushalP
Copy link
Contributor Author

KushalP commented Jun 22, 2020

This is now ready for another review. It looks like it successfully removes mxj.

@Tapac
Copy link
Contributor

Tapac commented Jun 29, 2020

@KushalP , in the current implementation you removed the possibility to run tests with exposedDialectTestWithDocker gradle task which uses docker-compose configs. There are to MySQL related docker-compose tests: Mysql 5.7 + jdbc 5.1 and Mysql 8.0 + jdbc 8.0.
Could you please change code to support either previous behavior, or implement similar with test-containers?

@KushalP
Copy link
Contributor Author

KushalP commented Jun 30, 2020

@Tapac are they run in TeamCity? If possible, is it possible to get them added to TeamCity so that my PR shows up as red in this case. If I'd seen that feedback, I would have gone and fixed it. I'll work on that next.

@Tapac
Copy link
Contributor

Tapac commented Jul 2, 2020

@KushalP , yes, but only master branch. You could check how to run tests locally here just try mysql or mysql8 and ensure what test-containers was not started.

KushalP added 2 commits July 7, 2020 19:33
The mxj library is flaky and doesn't work on various platforms due to
being outdated.
Without this, we'll see the following permission exceptions for some
of our tests:

```
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'test'@'%' to database 'two'
org.jetbrains.exposed.exceptions.ExposedSQLException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'test'@'%' to database 'two'
SQL: [CREATE SCHEMA IF NOT EXISTS two]
	at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:63)
	at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:129)
	at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:115)
```
@KushalP KushalP force-pushed the nj-use-testcontainers-for-mysql-insteado-of-mxj branch from e3e6125 to 621889b Compare July 7, 2020 18:33
@KushalP
Copy link
Contributor Author

KushalP commented Jul 7, 2020

@Tapac I've tested it and it's now possible to run the exposedDialectTestWithDocker task for mysql and mysql8 dialects.

@Tapac Tapac merged commit 81d8e48 into JetBrains:master Jul 8, 2020
Tapac added a commit that referenced this pull request Jul 8, 2020
@KushalP KushalP deleted the nj-use-testcontainers-for-mysql-insteado-of-mxj branch July 8, 2020 22:09
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.

2 participants