Running Rails Unit tests with MySql fails on rollback due to autocommit being on
--------------------------------------------------------------------------------

                 Key: JRUBY-2422
                 URL: http://jira.codehaus.org/browse/JRUBY-2422
             Project: JRuby
          Issue Type: Bug
          Components: JRuby-extras
    Affects Versions: JRuby 1.1
         Environment: Windows XP x64, Rails 2.0.2, Active Record Adaptor 0.8, 
MySql JDBC Driver 5.1.6
            Reporter: Robert Rees


I am running a basic unit test of an Active Record and the test fails with the 
following exception message:

Exception in thread "main" 
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Can't 
call rollback when autocommit=true

This issue seems to be that when the connection is created auto commit is not 
switched off and the transactions are then managed from the Gem. The test data 
from the fixtures is not present in the test database.

This issue has also been noted in the RSpec 
forums:http://www.ruby-forum.com/topic/150354

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to