-
Notifications
You must be signed in to change notification settings - Fork 1k
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
chore(sql): convert tests to use tc-mysql, unpin jooq #3832
Conversation
asher
commented
Jul 1, 2019
- Also removes H2 specific query special handling. Depends on fix(sql): fix SqlTestUtil connection leak, schema based cleanup kork#330.
@@ -38,7 +40,7 @@ class SqlCacheSpec extends WriteableCacheSpec { | |||
((SqlCache) cache).merge('foo', data) | |||
|
|||
then: | |||
1 * ((SqlCache) cache).cacheMetrics.merge('test', 'foo', 1, 1, 0, 0, 2, 1, 0) | |||
1 * ((SqlCache) cache).cacheMetrics.merge('test', 'foo', 1, 1, 0, 0, 1, 1, 0) |
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.
H2 special handling resulted in an additional select statement, which is no longer the case.
@@ -95,7 +95,7 @@ abstract class CacheSpec extends Specification { | |||
'*TEST*' | ['blaTEST', 'blaTESTbla', 'TESTbla'] | |||
'bla*' | ['blaTEST', 'blaTESTbla', 'blaPest', 'blaFEST'] | |||
'bla[TF]EST' | ['blaTEST', 'blaFEST'] | |||
'bla?EST' | ['blaTEST', 'blaFEST'] |
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.
This test previously passed because H2 treats regex statements as case sensitive by default. MySQL defaults to case insensitive, but that's preferable. Case insensitive search was a requested feature which cat-sql delivers.
Great to see that Testcontainers provided a better solution here. I'm curious though, what was the reason for having to "pin" jOOQ to an old release? Something that could have been avoided on the jOOQ side? |
@lukaseder Thanks for asking! The problem was primarily around interactions with H2 after jooq added support for some non standard sql extensions with H2, like |