Discussion: Slow RAILS testing
Afficher un message
Vieux 15/09/2007, 18h24   #9
Phlip
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Slow RAILS testing

Travis D Warlick Jr wrote:

> One possible rails issue: I believe the entire test database structure is
> erased
> and recreated everytime, so it couldn't be a rake task, it would have to
> be
> integrated into the test task.


Yup; I just got that.

Then I put the conversion into the top of the source file of the first test
suite in alphabetic order (please nobody comment on the sustainability!),
and got a huge spew of test faults, as if I had no fixtures. The converter
was just this:

require File.dirname(__FILE__) + '/../test_er'

def setup_database
tables = %w( accessories chats fighter_images props rings rounds users )
tables.each do |table|
ActiveRecord::Base.connection.execute("
ALTER TABLE #{ table } ENGINE=HEAP
")
end
end
setup_database

class AccessoryTest < Test::Unit::TestCase
...

And note, per the memory consumption issues you mentioned, that you don't
need to put all the fixtures in the list - if it worked!

--
Phlip


  Réponse avec citation
 
Page generated in 0,05541 seconds with 9 queries