diff options
author | Jamis Buck <jamis@37signals.com> | 2011-01-19 10:27:53 -0700 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2011-01-19 10:57:30 -0700 |
commit | 16a23a184e8b091392c0b6001a025bee8323ec8e (patch) | |
tree | 63919d866b0702d8446a74db9f2b0fb4110a69a7 /activesupport/test/test_test.rb | |
parent | 79a06225ef0e148eb5da541711f74163b5efb18d (diff) | |
download | rails-16a23a184e8b091392c0b6001a025bee8323ec8e.tar.gz rails-16a23a184e8b091392c0b6001a025bee8323ec8e.tar.bz2 rails-16a23a184e8b091392c0b6001a025bee8323ec8e.zip |
rein in GC during tests by making them run (at most) once per second
this can provide a significant performance boost during testing, by
preventing the GC from running too frequently.
Diffstat (limited to 'activesupport/test/test_test.rb')
-rw-r--r-- | activesupport/test/test_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/test/test_test.rb b/activesupport/test/test_test.rb index ea652844f5..fa86053301 100644 --- a/activesupport/test/test_test.rb +++ b/activesupport/test/test_test.rb @@ -135,9 +135,9 @@ class SetupAndTeardownTest < ActiveSupport::TestCase teardown :foo, :sentinel, :foo def test_inherited_setup_callbacks - assert_equal [:reset_callback_record, :foo], self.class._setup_callbacks.map(&:raw_filter) + assert_equal [:begin_gc_deferment, :reset_callback_record, :foo], self.class._setup_callbacks.map(&:raw_filter) assert_equal [:foo], @called_back - assert_equal [:scrub_leftover_instance_variables, :foo, :sentinel, :foo], self.class._teardown_callbacks.map(&:raw_filter) + assert_equal [:scrub_leftover_instance_variables, :reconsider_gc_deferment, :foo, :sentinel, :foo], self.class._teardown_callbacks.map(&:raw_filter) end def setup @@ -167,9 +167,9 @@ class SubclassSetupAndTeardownTest < SetupAndTeardownTest teardown :bar def test_inherited_setup_callbacks - assert_equal [:reset_callback_record, :foo, :bar], self.class._setup_callbacks.map(&:raw_filter) + assert_equal [:begin_gc_deferment, :reset_callback_record, :foo, :bar], self.class._setup_callbacks.map(&:raw_filter) assert_equal [:foo, :bar], @called_back - assert_equal [:scrub_leftover_instance_variables, :foo, :sentinel, :foo, :bar], self.class._teardown_callbacks.map(&:raw_filter) + assert_equal [:scrub_leftover_instance_variables, :reconsider_gc_deferment, :foo, :sentinel, :foo, :bar], self.class._teardown_callbacks.map(&:raw_filter) end protected |