-
Notifications
You must be signed in to change notification settings - Fork 485
Description
In Jruby, sequel's connection pool isn't using the same connection for database cleaner and the rest of the testing, so the transaction is not doing anything.
This is due to a jruby bug, not a db cleaner bug ( http://jira.codehaus.org/browse/JRUBY-7081 ) which is causing the fiber db cleaner is using to start the transaction to have a different Thread.current than its context.
I can work around this by passing db cleaner a block instead of calling #start before and #clean after. This avoids fibers and jruby's bugginess. I've pushed this up as a branch here https://github.com/sherbet/database_cleaner/compare/cleaning
I can add doc / tests if this seems like a good way to go.
as mentioned in this email https://groups.google.com/forum/#!topic/database_cleaner/bynKyMRSTMs