This project is archived and is in readonly mode.
Add AR test-connections for JDBC via JRuby
Reported by Stephen Bannasch | January 2nd, 2009 @ 05:16 AM | in 2.x
This is a patch for the AR tests that support running them in JRuby using jdbc connections.
A big part of the reason I'm working on this is to make it easier to test JRuby itself.
For example while developing these tests I found that running them caused JRuby to crash. On Dec 30 2008 Charlie Nutter fixed a JRuby regression that caused these tests to crash. If I can make it easier to run these tests in JRuby we'll find and fix these problems faster.
Here's the JRuby crash I found running the jdbcmysql tests:
The problem was related to hpricot using a deprecated and then deleted JRuby method that was part of it's implementation of fast_xs. AS uses fast_xs if it is present ...
That's just the kind of confusing bug that will be quicker to uncover if it's easier to run these tests in JRuby.
I run the AR mysql jdbc tests like this:
$ jruby -S rake test_jdbcmysql
This patch may well still need some work. I'm going to see if I can get Nick Sieger (recent activerecord-jdbc developer) to review them.
test status with trunk JRuby (r8541) and activerecord-jdbc v0.9
jdbcmysql: 1807 tests, 6004 assertions, 20 failures, 1 errors
jdbcpostgresql: 1812 tests, 1310 assertions, 4 failures, 1675 errors
jdbcsqlite3: 1807 tests, 889 assertions, 15 failures, 1673 errors
jdbch2: 1807 tests, 1809 assertions, 41 failures, 1361 errors
jdbchsqldb: 1807 tests, 4181 assertions, 33 failures, 553 errors
jdbcderby: 1812 tests, 759 assertions, 20 failures, 1765 errors
- jdbcderby test took over 10m to run
I'm using these gems for the test results above:
$ jruby -S gem list --local activerecord-jdbc
*** LOCAL GEMS ***
activerecord-jdbc-adapter (0.9)
activerecord-jdbcderby-adapter (0.9)
activerecord-jdbch2-adapter (0.9)
activerecord-jdbchsqldb-adapter (0.9)
activerecord-jdbcmysql-adapter (0.9)
activerecord-jdbcpostgresql-adapter (0.9)
activerecord-jdbcsqlite3-adapter (0.9)
Comments and changes to this ticket
-
Stephen Bannasch January 7th, 2009 @ 02:54 AM
I rebased to master and updated my patch to include Nick Sieger's changes.
-
CancelProfileIsBroken January 23rd, 2009 @ 04:53 PM
- I've been using this on an experimental version of the Rails CI server to test against JRuby.
-
Repository January 26th, 2009 @ 03:10 AM
- State changed from new to committed
(from [b081059913403d626ee1572dec4115aed2048912]) Adding AR tests for JDBC connections
New connections:
jdbcmysql jdbcpostgresql jdbcsqlite3 jdbcderby jdbch2 jdbchsqldb jdbcpostgresql
To test you will need the native database installed (if one is required), activerecord-jdbc-adapter and the specific activerecord-jdbc-adapter for the database you are testing.
Run the tests like this:
jruby -S rake test_jdbcmysql
Signed-off-by: Michael Koziarski michael@koziarski.com [#1685 state:committed] http://github.com/rails/rails/co...
-
Repository January 26th, 2009 @ 03:10 AM
(from [4ef9845aa324679b88e19b8223dd90b774215bc6]) Adding AR tests for JDBC connections
New connections:
jdbcmysql jdbcpostgresql jdbcsqlite3 jdbcderby jdbch2 jdbchsqldb jdbcpostgresql
To test you will need the native database installed (if one is required), activerecord-jdbc-adapter and the specific activerecord-jdbc-adapter for the database you are testing.
Run the tests like this:
jruby -S rake test_jdbcmysql
Signed-off-by: Michael Koziarski michael@koziarski.com [#1685 state:committed] http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 1685 Add AR test-connections for JDBC via JRuby Signed-off-by: Michael Koziarski michael@koziarski.com [#...
- 1685 Add AR test-connections for JDBC via JRuby Signed-off-by: Michael Koziarski michael@koziarski.com [#...