Skip to content

Sequel in JRuby doesn't clean #256

@ethco

Description

@ethco

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions