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: EXPOSED-236 Fix running tests with mysql8 #1967

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

e5l
Copy link
Member

@e5l e5l commented Jan 16, 2024

Fix EXPOSED-236 Gradle task testMysql8 runs tests on version 5.7.44

@e5l e5l requested a review from bog-walk January 16, 2024 13:24
@e5l e5l self-assigned this Jan 16, 2024
Copy link
Member

@bog-walk bog-walk left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @e5l! I only have 2 comments.

Comment on lines 58 to 65
else ->
"jdbc:mysql://127.0.0.1:3002/" +
"testdb" +
"?useSSL=false" +
"&characterEncoding=UTF-8" +
"&zeroDateTimeBehavior=convertToNull" +
"&allowPublicKeyRetrieval=true" +
"&useSSL=false"
}
Copy link
Member

Choose a reason for hiding this comment

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

The useSSL=false property is set twice in this url.

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, fixed

Comment on lines 31 to 32
Assume.assumeTrue(setOf(TestDB.MYSQL, TestDB.MARIADB, TestDB.POSTGRESQL, TestDB.SQLSERVER).containsAll(TestDB.enabledDialects()))
Assume.assumeFalse(System.getProperty("exposed.test.container") == "mysql8")
Copy link
Member

Choose a reason for hiding this comment

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

Rather than excluding mysql8 in both tests, I confirmed locally that both tests will pass if the system variable @@transaction_ISOLATION is used instead:

private fun Transaction.assertTransactionIsolationLevel(testDb: TestDB, expected: Int) {
    // ...
    TestDB.MYSQL, TestDB.MARIADB -> Triple("SELECT @@transaction_ISOLATION", "REPEATABLE-READ", "READ-COMMITTED")
}

@e5l
Copy link
Member Author

e5l commented Jan 24, 2024

@bog-walk, sorry for the long delay. It looks like we're out of memory because too many containers started. I don't want to have a failing build merged, so I will check what can be done.

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.

None yet

2 participants