Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9ef4ab80
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看板
提交
9ef4ab80
编写于
12月 02, 2021
作者:
Z
zhaoyuan17
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix codex
Signed-off-by:
N
zhaoyuan17
<
zhaoyuan17@huawei.com
>
上级
4c0583e0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
31 addition
and
31 deletion
+31
-31
notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/test/ActsSubscriber_test_unorder.js
...est/entry/src/main/js/test/ActsSubscriber_test_unorder.js
+31
-31
未找到文件。
notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/test/ActsSubscriber_test_unorder.js
浏览文件 @
9ef4ab80
...
...
@@ -21,14 +21,14 @@ describe('ActsSubscriberTestUnorder', async function (done) {
var
commonEventSubscriber002
;
var
commonEventSubscriber003
;
var
commonEventSubscriber004
;
var
commonEventSubscriber005
_
1
;
var
commonEventSubscriber005
_
2
;
var
commonEventSubscriber0051
;
var
commonEventSubscriber0052
;
var
commonEventSubscriber006
;
var
commonEventSubscriber007
;
var
commonEventSubscriber008
;
var
commonEventSubscriber009
;
var
commonEventSubscriber010
_
1
;
var
commonEventSubscriber010
_
2
;
var
commonEventSubscriber0101
;
var
commonEventSubscriber0102
;
var
commonEventSubscriber011
;
var
commonEventSubscriber012
;
...
...
@@ -36,11 +36,11 @@ describe('ActsSubscriberTestUnorder', async function (done) {
console
.
info
(
"
==========================>publishCallback
"
);
}
function
publishCallback1000
_
1
(
err
)
{
function
publishCallback10001
(
err
)
{
console
.
info
(
"
==========================>publishCallback
"
);
}
function
publishCallback1000
_
2
(
err
)
{
function
publishCallback10002
(
err
)
{
console
.
info
(
"
==========================>publishCallback
"
);
}
...
...
@@ -251,10 +251,10 @@ describe('ActsSubscriberTestUnorder', async function (done) {
commonEventSubscribeInfo
).
then
(
function
(
data
)
{
console
.
info
(
"
===============ActsSubscriberTestUnorder_0500_1=========createSubscriber promise
"
);
commonEventSubscriber005
_
1
=
data
;
commonEventSubscriber0051
=
data
;
data
.
getSubscribeInfo
().
then
(
function
(
data
)
{
console
.
info
(
"
===============ActsSubscriberTestUnorder_0500_1=========getSubscribeInfo promise
"
);
Subscriber
.
subscribe
(
commonEventSubscriber005
_
1
,
subscriberCallBack005
);
Subscriber
.
subscribe
(
commonEventSubscriber0051
,
subscriberCallBack005
);
});
})
...
...
@@ -262,11 +262,11 @@ describe('ActsSubscriberTestUnorder', async function (done) {
commonEventSubscribeInfo
).
then
(
function
(
data
)
{
console
.
info
(
"
===============ActsSubscriberTestUnorder_0500_2=========createSubscriber promise
"
);
commonEventSubscriber005
_
2
=
data
;
commonEventSubscriber0052
=
data
;
data
.
getSubscribeInfo
().
then
(
function
(
data
)
{
console
.
info
(
"
===============ActsSubscriberTestUnorder_0500_2=========getSubscribeInfo promise
"
);
Subscriber
.
subscribe
(
commonEventSubscriber005
_
2
,
subscriberCallBack005
);
Subscriber
.
unsubscribe
(
commonEventSubscriber005
_
1
,
unsubscriberCallBack
);
Subscriber
.
subscribe
(
commonEventSubscriber0052
,
subscriberCallBack005
);
Subscriber
.
unsubscribe
(
commonEventSubscriber0051
,
unsubscriberCallBack
);
setTimeout
(
function
(){
console
.
info
(
"
==========ActsSubscriberTestUnorder_0500 publish start============
"
);
Subscriber
.
publish
(
"
publish_event0500
"
,
commonEventPublishData
,
publishCallback
);
...
...
@@ -488,17 +488,17 @@ describe('ActsSubscriberTestUnorder', async function (done) {
var
num
=
0
;
var
commonEventSubscribeInfo
_
1
=
{
var
commonEventSubscribeInfo1
=
{
events
:
[
"
publish_event1000_1
"
],
priority
:
5
};
var
commonEventSubscribeInfo
_
2
=
{
var
commonEventSubscribeInfo2
=
{
events
:
[
"
publish_event1000_2
"
],
priority
:
10
};
var
commonEventPublishData
_
1
=
{
var
commonEventPublishData1
=
{
bundleName
:
"
publish_event1000_bundleName1
"
,
code
:
3
,
data
:
"
publish_event1000_data
"
,
...
...
@@ -506,7 +506,7 @@ describe('ActsSubscriberTestUnorder', async function (done) {
isSticky
:
false
,
}
var
commonEventPublishData
_
2
=
{
var
commonEventPublishData2
=
{
bundleName
:
"
publish_event1000_bundleName2
"
,
code
:
5
,
data
:
"
publish_event1000_data
"
,
...
...
@@ -514,10 +514,10 @@ describe('ActsSubscriberTestUnorder', async function (done) {
isSticky
:
false
,
}
async
function
subscriberCallBack010
_
1
(
err
,
data
)
{
console
.
info
(
"
==========================>subscriberCallBack010
_
1
"
);
console
.
info
(
"
==========================>subscriberCallBack010
_
1 event:
"
+
data
.
event
);
console
.
info
(
"
==========================>subscriberCallBack010
_
1 bundleName:
"
+
data
.
bundleName
);
async
function
subscriberCallBack0101
(
err
,
data
)
{
console
.
info
(
"
==========================>subscriberCallBack0101
"
);
console
.
info
(
"
==========================>subscriberCallBack0101 event:
"
+
data
.
event
);
console
.
info
(
"
==========================>subscriberCallBack0101 bundleName:
"
+
data
.
bundleName
);
expect
(
data
.
event
).
assertEqual
(
"
publish_event1000_1
"
);
expect
(
data
.
bundleName
).
assertEqual
(
"
publish_event1000_bundleName1
"
);
expect
(
data
.
code
).
assertEqual
(
3
);
...
...
@@ -529,10 +529,10 @@ describe('ActsSubscriberTestUnorder', async function (done) {
}
}
function
subscriberCallBack010
_
2
(
err
,
data
)
{
console
.
info
(
"
==========================>subscriberCallBack010
_
2
"
);
console
.
info
(
"
==========================>subscriberCallBack010
_
2 event:
"
+
data
.
event
);
console
.
info
(
"
==========================>subscriberCallBack010
_
2 bundleName:
"
+
data
.
bundleName
);
function
subscriberCallBack0102
(
err
,
data
)
{
console
.
info
(
"
==========================>subscriberCallBack0102
"
);
console
.
info
(
"
==========================>subscriberCallBack0102 event:
"
+
data
.
event
);
console
.
info
(
"
==========================>subscriberCallBack0102 bundleName:
"
+
data
.
bundleName
);
expect
(
data
.
event
).
assertEqual
(
"
publish_event1000_2
"
);
expect
(
data
.
bundleName
).
assertEqual
(
"
publish_event1000_bundleName2
"
);
expect
(
data
.
code
).
assertEqual
(
5
);
...
...
@@ -545,28 +545,28 @@ describe('ActsSubscriberTestUnorder', async function (done) {
}
Subscriber
.
createSubscriber
(
commonEventSubscribeInfo
_
1
commonEventSubscribeInfo1
).
then
(
function
(
data
)
{
console
.
info
(
"
=================ActsSubscriberTestUnorder_1000=========>createSubscriber Promise1000_1
"
);
commonEventSubscriber010
_
1
=
data
;
commonEventSubscriber0101
=
data
;
data
.
getSubscribeInfo
().
then
(
function
(
data
)
{
console
.
info
(
"
===============ActsSubscriberTestUnorder_1000=========getSubscribeInfo promise1000_1
"
);
Subscriber
.
subscribe
(
commonEventSubscriber010
_1
,
subscriberCallBack010_
1
);
Subscriber
.
subscribe
(
commonEventSubscriber010
1
,
subscriberCallBack010
1
);
});
});
Subscriber
.
createSubscriber
(
commonEventSubscribeInfo
_
2
commonEventSubscribeInfo2
).
then
(
function
(
data
)
{
console
.
info
(
"
=================ActsSubscriberTestUnorder_1000=========>createSubscriber Promise1000_2
"
);
commonEventSubscriber010
_
2
=
data
;
commonEventSubscriber0102
=
data
;
data
.
getSubscribeInfo
().
then
(
function
(
data
)
{
console
.
info
(
"
===============ActsSubscriberTestUnorder_1000=========getSubscribeInfo promise1000_2
"
);
Subscriber
.
subscribe
(
commonEventSubscriber010
_2
,
subscriberCallBack010_
2
);
Subscriber
.
subscribe
(
commonEventSubscriber010
2
,
subscriberCallBack010
2
);
setTimeout
(
function
(){
console
.
info
(
"
==========ActsSubscriberTestUnorder_1000 publish start============
"
);
Subscriber
.
publish
(
"
publish_event1000_1
"
,
commonEventPublishData
_1
,
publishCallback1000_
1
);
Subscriber
.
publish
(
"
publish_event1000_2
"
,
commonEventPublishData
_2
,
publishCallback1000_
2
);
Subscriber
.
publish
(
"
publish_event1000_1
"
,
commonEventPublishData
1
,
publishCallback1000
1
);
Subscriber
.
publish
(
"
publish_event1000_2
"
,
commonEventPublishData
2
,
publishCallback1000
2
);
},
1000
);
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录