Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
8053e27a
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8053e27a
编写于
3月 17, 2022
作者:
K
kirl.liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix codex
Signed-off-by:
N
kirl.liu
<
kirl.liu@huawei.com
>
上级
497ef178
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
13 deletion
+8
-13
notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/test/ActsSubscriber_test_ordered.js
...est/entry/src/main/js/test/ActsSubscriber_test_ordered.js
+1
-1
notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/test/ActsSubscriber_test_unorder.js
...est/entry/src/main/js/test/ActsSubscriber_test_unorder.js
+2
-2
notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/test/ActsSubscriber_test_unorder.js
...est/entry/src/main/js/test/ActsSubscriber_test_unorder.js
+5
-10
未找到文件。
notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/test/ActsSubscriber_test_ordered.js
浏览文件 @
8053e27a
...
...
@@ -383,7 +383,7 @@ describe('ActsSubscriberTestOrder', function () {
* @tc.number : ActsSubscriberTestOrder_0400
* @tc.name : verify subscribe and publish : Check subscribe same events
* and publish common ordered events and check abort event
* @tc.desc : Check the subscriber can receive event "publish_eventOrder0400" type of the interface
(by promise)
* @tc.desc : Check the subscriber can receive event "publish_eventOrder0400" type of the interface
by promise
*/
it
(
'
ActsSubscriberTestOrder_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
===============ActsSubscriberTestOrder_0400===============>
"
);
...
...
notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/test/ActsSubscriber_test_unorder.js
浏览文件 @
8053e27a
...
...
@@ -210,7 +210,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
Subscriber
.
subscribe
(
commonEventSubscriber1
,
subscriberCallBack001
);
for
(
let
i
=
0
;
i
<
50
;
++
i
)
{
setTimeout
(
function
(){
console
.
debug
(
"
===============>ActsSubscriberTestUnorderSystem_0100 delay 1s=========
=========i :
"
+
i
);
console
.
debug
(
"
===============>ActsSubscriberTestUnorderSystem_0100 delay 1s=========
i:
"
+
i
);
Subscriber
.
publish
(
commonEventSubscribeInfo
.
events
[
i
],
publishCallback
);
},
1000
);
}
...
...
@@ -287,7 +287,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
Subscriber
.
subscribe
(
commonEventSubscriber2
,
subscriberCallBack002
);
for
(
let
i
=
0
;
i
<
36
;
++
i
)
{
setTimeout
(
function
(){
console
.
debug
(
"
===============>ActsSubscriberTestUnorderSystem_0200 delay 1s===========
=======i
:
"
+
i
);
console
.
debug
(
"
===============>ActsSubscriberTestUnorderSystem_0200 delay 1s===========
i
:
"
+
i
);
Subscriber
.
publish
(
commonEventSubscribeInfo
.
events
[
i
],
publishCallback
);
},
1000
);
}
...
...
notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/test/ActsSubscriber_test_unorder.js
浏览文件 @
8053e27a
...
...
@@ -350,8 +350,7 @@ describe('ActsSubscriberTestUnorder', async function (done) {
function
sleep
(
delay
)
{
var
start
=
(
new
Date
()).
getTime
();
while
((
new
Date
()).
getTime
()
-
start
<
delay
)
{
continue
;
while
((
new
Date
()).
getTime
()
-
start
<
delay
)
{
}
done
();
}
...
...
@@ -430,7 +429,7 @@ describe('ActsSubscriberTestUnorder', async function (done) {
expect
(
data
.
data
).
assertEqual
(
"
publish_event1000_data
"
);
if
(
num
==
0
)
{
num
++
;
}
else
if
(
num
==
1
)
{
}
else
if
(
num
==
1
)
{
done
();
}
}
...
...
@@ -445,14 +444,12 @@ describe('ActsSubscriberTestUnorder', async function (done) {
expect
(
data
.
data
).
assertEqual
(
"
publish_event1000_data
"
);
if
(
num
==
0
)
{
num
++
;
}
else
if
(
num
==
1
)
{
}
else
if
(
num
==
1
)
{
done
();
}
}
Subscriber
.
createSubscriber
(
commonEventSubscribeInfo1
).
then
((
data
)
=>
{
Subscriber
.
createSubscriber
(
commonEventSubscribeInfo1
).
then
((
data
)
=>
{
console
.
info
(
"
=================ActsSubscriberTestUnorder_1000=========>createSubscriber Promise1000_1
"
);
commonEventSubscriber0101
=
data
;
data
.
getSubscribeInfo
().
then
(()
=>
{
...
...
@@ -461,9 +458,7 @@ describe('ActsSubscriberTestUnorder', async function (done) {
});
});
Subscriber
.
createSubscriber
(
commonEventSubscribeInfo2
).
then
((
data
)
=>
{
Subscriber
.
createSubscriber
(
commonEventSubscribeInfo2
).
then
((
data
)
=>
{
console
.
info
(
"
=================ActsSubscriberTestUnorder_1000=========>createSubscriber Promise1000_2
"
);
commonEventSubscriber0102
=
data
;
data
.
getSubscribeInfo
().
then
(()
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录