I''ve got a patch to the AR tests that support running them in JRuby. Right now the patch only works for mysql. A big part of the reason I''m working on this is to make it easier to test JRuby itself. Charlie Nutter just fixed yesterday JRuby regression that caused these tests to crash yesterday. If I can make it easier to run these tests in JRuby we''ll find and fix these problems faster. Here''s an example of a problem in JRuby I found: http://jira.codehaus.org/browse/JRUBY-3270 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 ... http://jira.codehaus.org/browse/JRUBY-3272 I run the AR mysql jdbc tests like this: $ jruby -S rake test_jdbcmysql I''ve got the patch up here and a listing of what errors are occurring now: http://pastie.org/349823 Is anybody else working on something like this. I was planning to implement the same pattern for other d adapters available via jdbc and then submit a patch to rails. Is this something the core team would be interested in seeing in the codebase? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
I''m not a fan of the platform/implementation conditions. When I did the SQL Server adapter, I found it very easy to use ruby to coerce the tests that I needed to. See the links below and you can see how I did this with a simple method_added hook. This leaves core to do what they want and focus on corey things and we can use ruby to do what we need to :) http://github.com/rails-sqlserver/2000-2005-adapter/tree/master http://github.com/rails-sqlserver/2000-2005-adapter/tree/master/test/cases/sqlserver_helper.rb#L41 - Ken On Dec 31, 2008, at 3:47 PM, Stephen Bannasch wrote:> > I''ve got a patch to the AR tests that support running them in JRuby. > Right now the patch only works for mysql. > > A big part of the reason I''m working on this is to make it easier to > test JRuby itself. Charlie Nutter just fixed yesterday JRuby > regression that caused these tests to crash yesterday. If I can make > it easier to run these tests in JRuby we''ll find and fix these > problems faster. > > Here''s an example of a problem in JRuby I found: > > http://jira.codehaus.org/browse/JRUBY-3270 > > 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 ... > > http://jira.codehaus.org/browse/JRUBY-3272 > > I run the AR mysql jdbc tests like this: > > $ jruby -S rake test_jdbcmysql > > I''ve got the patch up here and a listing of what errors are > occurring now: > > http://pastie.org/349823 > > Is anybody else working on something like this. > > I was planning to implement the same pattern for other d adapters > available via jdbc and then submit a patch to rails. > > Is this something the core team would be interested in seeing in the > codebase? > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
>I''m not a fan of the platform/implementation conditions. When I did >the SQL Server adapter, I found it very easy to use ruby to coerce the >tests that I needed to. See the links below and you can see how I did >this with a simple method_added hook. This leaves core to do what they >want and focus on corey things and we can use ruby to do what we need >to :) > >http://github.com/rails-sqlserver/2000-2005-adapter/tree/master >http://github.com/rails-sqlserver/2000-2005-adapter/tree/master/test/cases/sqlserver_helper.rb#L41Thanks for the comments Ken, I like the fact that your implementation doesn''t touch the rails code. I don''t like that it needs to be in a plugin relationship to rails. Do you think the same result could be done in a gem install? I don''t have an sqlserver to test your code on but tell me if I''ve got this right: Here''s how to run the all the Ar tests for sqlsever: cd activerecord rake test_sqlserver This runs all the AR tests on the sqlserver server ... except where an original test like this: migration_test.rb has a matching test in your test/cases dir with the adapter name suffixed on the name of the test: migration_test_sqlserver.rb You have 16 test files in your cases dir -- it looks like most of them reflect tests in the AR test/cases dir -- except for: aaaa_create_tables_test_sqlserver.rb which has one extra ''a'' compared to the AR test: aaa_create_tables_test.rb This mean you need to track functional changes in the AR tests and port them over to your test suite. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On Wed, Dec 31, 2008 at 12:47 PM, Stephen Bannasch <stephen.bannasch@deanbrook.org> wrote:> > I''ve got a patch to the AR tests that support running them in JRuby. > Right now the patch only works for mysql. > > A big part of the reason I''m working on this is to make it easier to > test JRuby itself. Charlie Nutter just fixed yesterday JRuby > regression that caused these tests to crash yesterday. If I can make > it easier to run these tests in JRuby we''ll find and fix these > problems faster. > > Here''s an example of a problem in JRuby I found: > > http://jira.codehaus.org/browse/JRUBY-3270 > > 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 ... > > http://jira.codehaus.org/browse/JRUBY-3272 > > I run the AR mysql jdbc tests like this: > > $ jruby -S rake test_jdbcmysql > > I''ve got the patch up here and a listing of what errors are occurring now: > > http://pastie.org/349823 > > Is anybody else working on something like this. > > I was planning to implement the same pattern for other d adapters > available via jdbc and then submit a patch to rails. > > Is this something the core team would be interested in seeing in the codebase?Definitely! Please post a ticket with the patch on Lighthouse. The ''if JRUBY'' conditional isn''t needed: just add jdbcmysql to the adapter list in the Rakefile and a test/connections/native_jdbcmysql.rb with the connection setup. jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
>On Wed, Dec 31, 2008 at 12:47 PM, Stephen Bannasch ><stephen.bannasch@deanbrook.org> wrote: >> > > I''ve got a patch to the AR tests that support running them in JRuby....> > Is this something the core team would be interested in seeing in >the codebase? > >Definitely! Please post a ticket with the patch on Lighthouse. > >The ''if JRUBY'' conditional isn''t needed: just add jdbcmysql to the >adapter list in the Rakefile and a >test/connections/native_jdbcmysql.rb with the connection setup.Here''s a initial patch that supports running AR tests in JRuby for mysql, postgresql, sqlite3 and the Java databases: h2, hsqldb and derby. http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1685-add-ar-test-connections-for-jdbc-via-jruby --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
http://rails.lighthouseapp.com/projects/8994/tickets/1685-adding-ar-test-connections-for-jdbc-via-jruby I''ve got two +1s from Nick Sieger and Tom Enebo (core JRuby developers) for this patch. Is there anybody else on the core mailing list who is interested in taking a look at he patch? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---