aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/share_lock_test.rb
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2015-07-21 08:50:50 +0930
committerMatthew Draper <matthew@trebex.net>2015-07-21 08:50:50 +0930
commit649d8173c31ab0b74ef359e692eadf46b5da911d (patch)
treea6daad575a51af0963e809881774cc16f059f98d /activesupport/test/share_lock_test.rb
parentb3d78e8c23e3cbd5325719474efb9f7ee4168f72 (diff)
downloadrails-649d8173c31ab0b74ef359e692eadf46b5da911d.tar.gz
rails-649d8173c31ab0b74ef359e692eadf46b5da911d.tar.bz2
rails-649d8173c31ab0b74ef359e692eadf46b5da911d.zip
Order of execution is only guaranteed if upgrading
If the thread isn't yet holding any form of lock, it has no claim over what may / may not run while it's blocked.
Diffstat (limited to 'activesupport/test/share_lock_test.rb')
-rw-r--r--activesupport/test/share_lock_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/test/share_lock_test.rb b/activesupport/test/share_lock_test.rb
index fd50516581..87cd116429 100644
--- a/activesupport/test/share_lock_test.rb
+++ b/activesupport/test/share_lock_test.rb
@@ -147,7 +147,9 @@ class ShareLockTest < ActiveSupport::TestCase
assert_threads_not_stuck threads
scratch_pad_mutex.synchronize do
- assert_equal [:load, :load, :unload, :unload], scratch_pad
+ if use_upgrading
+ assert_equal [:load, :load, :unload, :unload], scratch_pad
+ end
scratch_pad.clear
end
end