From 1ea085ec7e77af32bf5234fb4642b012aec62779 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Sun, 16 Oct 2005 02:30:04 +0000 Subject: Comment out the memory leak test because it b0rks the testing environment. Update some contact info. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2636 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../connection_adapters/sqlite_adapter.rb | 2 +- activerecord/test/base_test.rb | 39 ++++++++++++---------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb index 8f2129838b..c356f607c9 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb @@ -1,5 +1,5 @@ # Author: Luke Holden -# Updated for SQLite3: Jamis Buck +# Updated for SQLite3: Jamis Buck require 'active_record/connection_adapters/abstract_adapter' diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb index ae443c5329..28e7f28f21 100755 --- a/activerecord/test/base_test.rb +++ b/activerecord/test/base_test.rb @@ -1024,24 +1024,27 @@ class BasicsTest < Test::Unit::TestCase assert_nothing_raised { Category.new.send(:interpolate_sql, 'foo bar} baz') } end - def test_dev_mode_memory_leak - counts = [] - 2.times do - require_dependency 'fixtures/company' - Firm.find(:first) - Dependencies.clear - ActiveRecord::Base.reset_subclasses - Dependencies.remove_subclasses_for(ActiveRecord::Base) - - GC.start - - count = 0 - ObjectSpace.each_object(Proc) { count += 1 } - counts << count - end - assert counts.last <= counts.first, - "expected last count (#{counts.last}) to be <= first count (#{counts.first})" - end + # FIXME: this test ought to run, but it needs to run sandboxed so that it + # doesn't b0rk the current test environment by undefing everything. + # + #def test_dev_mode_memory_leak + # counts = [] + # 2.times do + # require_dependency 'fixtures/company' + # Firm.find(:first) + # Dependencies.clear + # ActiveRecord::Base.reset_subclasses + # Dependencies.remove_subclasses_for(ActiveRecord::Base) + # + # GC.start + # + # count = 0 + # ObjectSpace.each_object(Proc) { count += 1 } + # counts << count + # end + # assert counts.last <= counts.first, + # "expected last count (#{counts.last}) to be <= first count (#{counts.first})" + #end private -- cgit v1.2.3