aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-11-13 18:57:10 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2009-11-13 18:57:10 -0800
commit7ab78b9ccd1f760960a77b5be9aac0c27212abe2 (patch)
treefd9ae9fd3326ac71c456707f2c11d1f304052c7d /activesupport
parent7b3d85db4c58e2f719981efd6ef5a6b870f6ab49 (diff)
downloadrails-7ab78b9ccd1f760960a77b5be9aac0c27212abe2.tar.gz
rails-7ab78b9ccd1f760960a77b5be9aac0c27212abe2.tar.bz2
rails-7ab78b9ccd1f760960a77b5be9aac0c27212abe2.zip
CI: slow down brittle notifications tests
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/notifications_test.rb19
1 files changed, 10 insertions, 9 deletions
diff --git a/activesupport/test/notifications_test.rb b/activesupport/test/notifications_test.rb
index 9175c8f26e..334496374b 100644
--- a/activesupport/test/notifications_test.rb
+++ b/activesupport/test/notifications_test.rb
@@ -75,7 +75,7 @@ class NotificationsMainTest < Test::Unit::TestCase
1 + 1
end
- sleep(0.1)
+ sleep 1
assert_equal 1, @events.size
assert_equal :awesome, @events.last.name
@@ -88,14 +88,14 @@ class NotificationsMainTest < Test::Unit::TestCase
1 + 1
end
- sleep(0.1)
+ sleep 1
assert_equal 1, @events.size
assert_equal :wot, @events.first.name
assert_equal Hash[:payload => "child"], @events.first.payload
end
- sleep(0.1)
+ sleep 1
assert_equal 2, @events.size
assert_equal :awesome, @events.last.name
@@ -108,7 +108,7 @@ class NotificationsMainTest < Test::Unit::TestCase
raise "OMG"
end rescue RuntimeError
- sleep(0.1)
+ sleep 1
assert_equal 1, @events.size
assert_equal :awesome, @events.last.name
@@ -117,7 +117,7 @@ class NotificationsMainTest < Test::Unit::TestCase
def test_event_is_pushed_even_without_block
ActiveSupport::Notifications.instrument(:awesome, :payload => "notifications")
- sleep(0.1)
+ sleep 1
assert_equal 1, @events.size
assert_equal :awesome, @events.last.name
@@ -137,8 +137,9 @@ class NotificationsMainTest < Test::Unit::TestCase
end
ActiveSupport::Notifications.instrument(:cache){ 1 }
- sleep 0.1
+ sleep 1
+ assert_equal 3, @another.size
before, during, after = @another.map {|e| e.transaction_id }
assert_equal before, after
assert_not_equal before, during
@@ -153,7 +154,7 @@ class NotificationsMainTest < Test::Unit::TestCase
ActiveSupport::Notifications.instrument(:cache){ 1 }
- sleep(0.1)
+ sleep 1
assert_equal 1, @another.size
assert_equal :cache, @another.first.name
@@ -169,7 +170,7 @@ class NotificationsMainTest < Test::Unit::TestCase
ActiveSupport::Notifications.instrument(:something){ 0 }
ActiveSupport::Notifications.instrument(:cache){ 1 }
- sleep(0.1)
+ sleep 1
assert_equal 1, @another.size
assert_equal :cache, @another.first.name
@@ -186,7 +187,7 @@ class NotificationsMainTest < Test::Unit::TestCase
ActiveSupport::Notifications.instrument(:value){ i }
end
- sleep 0.1
+ sleep 1
assert_equal 100, @events.size
assert_equal :value, @events.first.name