mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Removed test which works only < 1.9
This commit is contained in:
parent
afea8c7948
commit
de78c7e8e4
3 changed files with 0 additions and 34 deletions
|
@ -1357,22 +1357,6 @@ class BasicsTest < ActiveRecord::TestCase
|
||||||
assert_equal author_name, Topic.find(topic.id).author_name
|
assert_equal author_name, Topic.find(topic.id).author_name
|
||||||
end
|
end
|
||||||
|
|
||||||
if RUBY_VERSION < '1.9'
|
|
||||||
def test_quote_chars
|
|
||||||
with_kcode('UTF8') do
|
|
||||||
str = 'The Narrator'
|
|
||||||
topic = Topic.create(:author_name => str)
|
|
||||||
assert_equal str, topic.author_name
|
|
||||||
|
|
||||||
assert_kind_of ActiveSupport::Multibyte.proxy_class, str.mb_chars
|
|
||||||
topic = Topic.find_by_author_name(str.mb_chars)
|
|
||||||
|
|
||||||
assert_kind_of Topic, topic
|
|
||||||
assert_equal str, topic.author_name, "The right topic should have been found by name even with name passed as Chars"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_toggle_attribute
|
def test_toggle_attribute
|
||||||
assert !topics(:first).approved?
|
assert !topics(:first).approved?
|
||||||
topics(:first).toggle!(:approved)
|
topics(:first).toggle!(:approved)
|
||||||
|
|
|
@ -421,16 +421,6 @@ unless current_adapter?(:SybaseAdapter, :OpenBaseAdapter) || in_memory_db?
|
||||||
assert first.end > second.end
|
assert first.end > second.end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Hit by ruby deadlock detection since connection checkout is mutexed.
|
|
||||||
if RUBY_VERSION < '1.9.0'
|
|
||||||
def test_second_lock_waits
|
|
||||||
assert [0.2, 1, 5].any? { |zzz|
|
|
||||||
first, second = duel(zzz) { Person.find 1, :lock => true }
|
|
||||||
second.end > first.end
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
protected
|
protected
|
||||||
def duel(zzz = 5)
|
def duel(zzz = 5)
|
||||||
t0, t1, t2, t3 = nil, nil, nil, nil
|
t0, t1, t2, t3 = nil, nil, nil, nil
|
||||||
|
|
|
@ -33,14 +33,6 @@ class PooledConnectionsTest < ActiveRecord::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
# Will deadlock due to lack of Monitor timeouts in 1.9
|
# Will deadlock due to lack of Monitor timeouts in 1.9
|
||||||
if RUBY_VERSION < '1.9'
|
|
||||||
def test_pooled_connection_checkout
|
|
||||||
checkout_connections
|
|
||||||
assert_equal 2, @connections.length
|
|
||||||
assert_equal 2, @timed_out
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def checkout_checkin_connections(pool_size, threads)
|
def checkout_checkin_connections(pool_size, threads)
|
||||||
ActiveRecord::Base.establish_connection(@connection.merge({:pool => pool_size, :wait_timeout => 0.5}))
|
ActiveRecord::Base.establish_connection(@connection.merge({:pool => pool_size, :wait_timeout => 0.5}))
|
||||||
@connection_count = 0
|
@connection_count = 0
|
||||||
|
|
Loading…
Reference in a new issue