Upgrade to Rails 2.2.0
As a side benefit, fix an (non-user-visible) bug in display_s5(). Also fixed a bug where removing orphaned pages did not expire cached summary pages.
This commit is contained in:
parent
39348c65c2
commit
7600aef48b
827 changed files with 123652 additions and 11027 deletions
|
@ -70,7 +70,7 @@ class BufferedLoggerTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
@logger.flush
|
||||
assert !@output.string.empty?, @logger.buffer.size
|
||||
assert !@output.string.empty?, @logger.send(:buffer).size
|
||||
end
|
||||
|
||||
define_method "test_disabling_auto_flush_with_#{disable.inspect}_should_flush_at_max_buffer_size_as_failsafe" do
|
||||
|
@ -83,10 +83,10 @@ class BufferedLoggerTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
@logger.info 'there it is.'
|
||||
assert !@output.string.empty?, @logger.buffer.size
|
||||
assert !@output.string.empty?, @logger.send(:buffer).size
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def test_should_know_if_its_loglevel_is_below_a_given_level
|
||||
ActiveSupport::BufferedLogger::Severity.constants.each do |level|
|
||||
@logger.level = ActiveSupport::BufferedLogger::Severity.const_get(level) - 1
|
||||
|
@ -105,7 +105,7 @@ class BufferedLoggerTest < Test::Unit::TestCase
|
|||
@logger.info 'there it is.'
|
||||
assert !@output.string.empty?, @output.string
|
||||
end
|
||||
|
||||
|
||||
def test_should_create_the_log_directory_if_it_doesnt_exist
|
||||
tmp_directory = File.join(File.dirname(__FILE__), "tmp")
|
||||
log_file = File.join(tmp_directory, "development.log")
|
||||
|
@ -115,4 +115,26 @@ class BufferedLoggerTest < Test::Unit::TestCase
|
|||
ensure
|
||||
FileUtils.rm_rf(tmp_directory)
|
||||
end
|
||||
|
||||
def test_logger_should_maintain_separate_buffers_for_each_thread
|
||||
@logger.auto_flushing = false
|
||||
|
||||
a = Thread.new do
|
||||
@logger.info("a"); Thread.pass;
|
||||
@logger.info("b"); Thread.pass;
|
||||
@logger.info("c"); @logger.flush
|
||||
end
|
||||
|
||||
b = Thread.new do
|
||||
@logger.info("x"); Thread.pass;
|
||||
@logger.info("y"); Thread.pass;
|
||||
@logger.info("z"); @logger.flush
|
||||
end
|
||||
|
||||
a.join
|
||||
b.join
|
||||
|
||||
assert @output.string.include?("a\nb\nc\n")
|
||||
assert @output.string.include?("x\ny\nz\n")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue