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: Integration tests not working correctly #806
Conversation
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.
LGTM.
|
||
// FIXME this test doesn't pass because of something with SequenceNextValUpdater |
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.
Issue for this?
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.
I pinged the contributor in in the PR where he just added this the other day
@johanandren here's a patch which should resolve the failing tests. |
@steventwheeler I'm afraid not, I think the error is related to not getting any rows back from the
I'll merge this and we can follow up with a fix for the disabled/failing test. |
@johanandren sorry about that it was an issue with my test setup. I was seeing different errors. I've been able to reproduce what you saw in the checks and am struggling a bit due to my inexperience with Scala & Slick. I've got a version that works with MariaDB, but it doesn't work with MySQL as MySQL hasn't implemented def getSequenceNextValueExpr() = {
val insertAction = sqlu"""INSERT INTO durable_state_global_offset_sequence (id) VALUES (DEFAULT(id))"""
val selectAction = sql"""SELECT LAST_INSERT_ID()""".as[String].head
(for {
insertRes <- insertAction
selectRes <- selectAction
} yield selectRes).transactionally
} This relies on a table to generate unique ID values similar to the sequence used in H2: CREATE TABLE IF NOT EXISTS durable_state_global_offset_sequence (
id BIGINT NOT NULL AUTO_INCREMENT,
PRIMARY KEY (id)); Alternatively, if you guys are okay with only supporting MariaDB this works just fine: def getSequenceNextValueExpr() = sql"""INSERT INTO durable_state_global_offset_sequence (id) VALUES (DEFAULT(id)) RETURNING id""".as[String] |
Hmm, MySQL is what we officially support, with MariaDB being more in a "likely working" status, so that is probably not good enough. It's not entirely obvious to me if a two step operations expression can be squeezed into |
Fair enough. At this point I think it makes more sense for me to write my own adapter rather than try and figure out how to make MySQL work with your interface. It's probably a good idea to revert my previous commit so someone doesn't try and use it. |
Ok, reverting in #807 for now then |
No description provided.