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
This commit is contained in:
Jamis Buck 2005-10-16 02:30:04 +00:00
parent 0279949b05
commit 1ea085ec7e
2 changed files with 22 additions and 19 deletions

@ -1,5 +1,5 @@
# Author: Luke Holden <lholden@cablelan.net>
# Updated for SQLite3: Jamis Buck <jamis_buck@byu.edu>
# Updated for SQLite3: Jamis Buck <jamis@37signals.com>
require 'active_record/connection_adapters/abstract_adapter'

@ -1024,24 +1024,27 @@ def test_interpolate_sql
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