aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/notifications_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-11-24 19:26:13 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2009-11-28 12:50:09 -0800
commit6f7fc5824f2033c0f674b002dbee7f1c3f3384ac (patch)
tree6d838011ebc6e8465a31bd1dbebecb7831cdbe26 /activesupport/test/notifications_test.rb
parenteeb1afa20003050039eab7420003a775343754c1 (diff)
downloadrails-6f7fc5824f2033c0f674b002dbee7f1c3f3384ac.tar.gz
rails-6f7fc5824f2033c0f674b002dbee7f1c3f3384ac.tar.bz2
rails-6f7fc5824f2033c0f674b002dbee7f1c3f3384ac.zip
Revert "Create SyncListener. Since they do not rely on Thread, they can be used on Google App Engine."
Take a step back on this API direction. This reverts commit 8104f65c3225453d13307c3c2733c2a8f99e491a.
Diffstat (limited to 'activesupport/test/notifications_test.rb')
-rw-r--r--activesupport/test/notifications_test.rb17
1 files changed, 1 insertions, 16 deletions
diff --git a/activesupport/test/notifications_test.rb b/activesupport/test/notifications_test.rb
index 35d44367cf..01106e83e9 100644
--- a/activesupport/test/notifications_test.rb
+++ b/activesupport/test/notifications_test.rb
@@ -176,21 +176,6 @@ class NotificationsMainTest < Test::Unit::TestCase
assert_equal 1, @another.first.result
end
- def test_subscriber_allows_sync_listeners
- @another = []
- ActiveSupport::Notifications.subscribe(/cache/, :with => ActiveSupport::Notifications::SyncListener) do |*args|
- @another << ActiveSupport::Notifications::Event.new(*args)
- end
-
- Thread.expects(:new).never
- ActiveSupport::Notifications.instrument(:something){ 0 }
- ActiveSupport::Notifications.instrument(:cache){ 1 }
-
- assert_equal 1, @another.size
- assert_equal :cache, @another.first.name
- assert_equal 1, @another.first.result
- end
-
def test_with_several_consumers_and_several_events
@another = []
ActiveSupport::Notifications.subscribe do |*args|
@@ -216,6 +201,6 @@ class NotificationsMainTest < Test::Unit::TestCase
private
def drain
- sleep(0.05) until ActiveSupport::Notifications.queue.drained?
+ sleep(0.1) until ActiveSupport::Notifications.queue.drained?
end
end