diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-11-27 10:30:25 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-27 10:30:25 +0900 |
commit | ad0630f0ae2d65bc0adda4097af8009a985b6f15 (patch) | |
tree | ac8f67af75f36826bb74cc09b78fa396d2f744ce /activerecord/test | |
parent | b1f140ef2e5af605ea12d8ee1c932eaf728a398d (diff) | |
download | rails-ad0630f0ae2d65bc0adda4097af8009a985b6f15.tar.gz rails-ad0630f0ae2d65bc0adda4097af8009a985b6f15.tar.bz2 rails-ad0630f0ae2d65bc0adda4097af8009a985b6f15.zip |
Rename `TransactionTimeout` to more descriptive `LockWaitTimeout` (#31223)
Since #31129, new error class `StatementTimeout` has been added.
`TransactionTimeout` is caused by the timeout shorter than
`StatementTimeout`, but its name is too generic. I think that it should
be a name that understands the difference with `StatementTimeout`.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapters/mysql2/transaction_test.rb | 4 | ||||
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/transaction_test.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/transaction_test.rb b/activerecord/test/cases/adapters/mysql2/transaction_test.rb index 4a3a4503de..da4b73a0da 100644 --- a/activerecord/test/cases/adapters/mysql2/transaction_test.rb +++ b/activerecord/test/cases/adapters/mysql2/transaction_test.rb @@ -60,8 +60,8 @@ module ActiveRecord end end - test "raises TransactionTimeout when lock wait timeout exceeded" do - assert_raises(ActiveRecord::TransactionTimeout) do + test "raises LockWaitTimeout when lock wait timeout exceeded" do + assert_raises(ActiveRecord::LockWaitTimeout) do s = Sample.create!(value: 1) latch1 = Concurrent::CountDownLatch.new latch2 = Concurrent::CountDownLatch.new diff --git a/activerecord/test/cases/adapters/postgresql/transaction_test.rb b/activerecord/test/cases/adapters/postgresql/transaction_test.rb index 4d63bbce59..ebba0f0c1c 100644 --- a/activerecord/test/cases/adapters/postgresql/transaction_test.rb +++ b/activerecord/test/cases/adapters/postgresql/transaction_test.rb @@ -91,9 +91,9 @@ module ActiveRecord end end - test "raises TransactionTimeout when lock wait timeout exceeded" do + test "raises LockWaitTimeout when lock wait timeout exceeded" do skip unless ActiveRecord::Base.connection.postgresql_version >= 90300 - assert_raises(ActiveRecord::TransactionTimeout) do + assert_raises(ActiveRecord::LockWaitTimeout) do s = Sample.create!(value: 1) latch1 = Concurrent::CountDownLatch.new latch2 = Concurrent::CountDownLatch.new |