Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
7ab78b9c
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
7ab78b9c
编写于
11月 13, 2009
作者:
J
Jeremy Kemper
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
CI: slow down brittle notifications tests
上级
7b3d85db
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
9 deletion
+10
-9
activesupport/test/notifications_test.rb
activesupport/test/notifications_test.rb
+10
-9
未找到文件。
activesupport/test/notifications_test.rb
浏览文件 @
7ab78b9c
...
...
@@ -75,7 +75,7 @@ def test_events_are_published_to_a_listener
1
+
1
end
sleep
(
0.1
)
sleep
1
assert_equal
1
,
@events
.
size
assert_equal
:awesome
,
@events
.
last
.
name
...
...
@@ -88,14 +88,14 @@ def test_nested_events_can_be_instrumented
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 @@ def test_event_is_pushed_even_if_block_fails
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 @@ def test_event_is_pushed_even_if_block_fails
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 @@ def test_subscribed_in_a_transaction
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 @@ def test_subscriber_with_pattern
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 @@ def test_subscriber_with_pattern_as_regexp
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 @@ def test_with_several_consumers_and_several_events
ActiveSupport
::
Notifications
.
instrument
(
:value
){
i
}
end
sleep
0.
1
sleep
1
assert_equal
100
,
@events
.
size
assert_equal
:value
,
@events
.
first
.
name
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录