-
Notifications
You must be signed in to change notification settings - Fork 38
Add check for purely in-memory or temporary database when incrementing newConnection
#105
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
Conversation
it.withStatement("insert into test(num, str)values(?,?)") { | ||
bindLong(1, 233) | ||
bindString(2, "asdfg") | ||
executeInsert() | ||
} |
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.
Added a 2nd insertion so that conn1.size == 1
and conn2.size == 2
to differentiate between the 2 ephemeral databases created
assertFails { | ||
val connFail = man.surpriseMeConnection() | ||
connFail.withTransaction { | ||
it.withStatement("insert into test(num, str)values(?,?)") { | ||
bindLong(1, 232) | ||
bindString(2, "asdf") | ||
executeInsert() | ||
} | ||
} | ||
} |
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.
Removed this, as the only reason it was failing was b/c create callback was not being invoked after first new connection was created.
} | ||
|
||
assertEquals(1, conn2.longForQuery("select count(*) from test")) | ||
assertEquals(1, conn1.longForQuery("select count(*) from test")) |
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.
Fixed this assertion to demonstrate that conn2
did nothing to conn1
database (I assumed it was a copy/paste mistake)
Fixes #104