Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
4c0583e0
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看板
提交
4c0583e0
编写于
12月 02, 2021
作者:
Z
zhaoyuan17
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Modify xts case bug
Signed-off-by:
N
zhaoyuan17
<
zhaoyuan17@huawei.com
>
上级
e2ea2159
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
1516 addition
and
1495 deletion
+1516
-1495
notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/test/ActsSubscriber_test_ordered.js
...est/entry/src/main/js/test/ActsSubscriber_test_ordered.js
+550
-525
notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/default/pages/index/index.js
...systemtest/entry/src/main/js/default/pages/index/index.js
+1
-0
notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/test/ActsSubscriber_test_unorder.js
...est/entry/src/main/js/test/ActsSubscriber_test_unorder.js
+297
-303
notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/test/ActsSubscriber_test_unorder.js
...est/entry/src/main/js/test/ActsSubscriber_test_unorder.js
+668
-667
未找到文件。
notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/test/ActsSubscriber_test_ordered.js
浏览文件 @
4c0583e0
...
...
@@ -17,7 +17,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
describe
(
'
ActsSubscriberTestOrder
'
,
function
()
{
console
.
info
(
"
===========ActsSubscriberTestOrder start====================>
"
);
var
num
=
0
,
num2
=
0
;
var
num
2
=
0
;
var
order
=
false
;
var
commonEventSubscriber0100
;
var
commonEventSubscriber0101
;
...
...
@@ -146,7 +146,10 @@ describe('ActsSubscriberTestOrder', function () {
data
.
getSubscribeInfo
().
then
(
function
(
data
)
{
console
.
info
(
"
===============ActsSubscriberTestOrder_0100=========getSubscribeInfo promise2
"
);
Subscriber
.
subscribe
(
commonEventSubscriber0101
,
subscriberCallBack0101
);
setTimeout
(
function
()
{
console
.
debug
(
"
===================ActsSubscriberTestOrder_0100 delay 100ms==================
"
);
Subscriber
.
publish
(
"
publish_event0100
"
,
commonEventPublishData
,
publishCallback
);
},
100
);
});
})
})
...
...
@@ -206,7 +209,7 @@ describe('ActsSubscriberTestOrder', function () {
expect
(
data
.
data
).
assertEqual
(
"
publish_event0201_init
"
);
expect
(
data
.
bundleName
).
assertEqual
(
"
publish_event0201_bundleName
"
);
commonEventSubscriber0200
.
finishCommonEvent
().
then
(()
=>
{
console
.
info
(
"
===============>subscriberCallBack0200:num
:1:finishCommonEvent promise
"
);
console
.
info
(
"
===============>subscriberCallBack0200:num
2:1:finishCommonEvent promise
"
);
})
}
}
...
...
@@ -247,10 +250,18 @@ describe('ActsSubscriberTestOrder', function () {
data
.
getSubscribeInfo
().
then
(
function
(
data
)
{
console
.
info
(
"
===============ActsSubscriberTestOrder_0200=========getSubscribeInfo promise2
"
);
Subscriber
.
subscribe
(
commonEventSubscriber0201
,
subscriberCallBack0201
);
setTimeout
(
function
()
{
console
.
debug
(
"
===================ActsSubscriberTestOrder_0200 delay 100ms==================
"
);
Subscriber
.
unsubscribe
(
commonEventSubscriber0200
,
unsubscribeCallback
);
},
100
);
setTimeout
(
function
()
{
console
.
debug
(
"
===================ActsSubscriberTestOrder_0200 delay 100ms==================
"
);
Subscriber
.
publish
(
"
publish_event0200
"
,
commonEventPublishData1
,
publishCallback
);
},
100
);
setTimeout
(
function
()
{
console
.
debug
(
"
===================ActsSubscriberTestOrder_0200 delay 100ms==================
"
);
Subscriber
.
publish
(
"
publish_event0201
"
,
commonEventPublishData2
,
publishCallback
);
},
100
);
});
})
})
...
...
@@ -281,6 +292,7 @@ describe('ActsSubscriberTestOrder', function () {
isOrdered
:
true
,
}
var
callBackNum
=
0
;
async
function
subscriberCallBack0300
(
err
,
data
)
{
console
.
info
(
"
===============>subscriberCallBack0300========event:
"
+
data
.
event
);
console
.
info
(
"
===============>subscriberCallBack0300========bundleName:
"
+
data
.
bundleName
);
...
...
@@ -305,8 +317,12 @@ describe('ActsSubscriberTestOrder', function () {
commonEventSubscriber0300
.
finishCommonEvent
().
then
(()
=>
{
console
.
info
(
"
===============>subscriberCallBack0300 finishCommonEvent promise
"
);
})
callBackNum
++
;
if
(
callBackNum
==
3
)
{
done
();
}
}
async
function
subscriberCallBack0301
(
err
,
data
)
{
console
.
info
(
"
===============>subscriberCallBack0301========event:
"
+
data
.
event
);
...
...
@@ -354,7 +370,10 @@ describe('ActsSubscriberTestOrder', function () {
Subscriber
.
subscribe
(
commonEventSubscriber0301
,
subscriberCallBack0301
);
var
numindex
=
0
;
for
(;
numindex
<
3
;
++
numindex
)
{
setTimeout
(
function
()
{
console
.
debug
(
"
===================ActsSubscriberTestOrder_0300 delay 100ms==================
"
);
Subscriber
.
publish
(
"
publish_event0301
"
,
commonEventPublishData2
,
publishCallback
);
},
100
);
}
});
})
...
...
@@ -437,7 +456,10 @@ describe('ActsSubscriberTestOrder', function () {
console
.
info
(
"
===============ActsSubscriberTestOrder_0400=========getSubscribeInfo promise2
"
);
expect
(
data
.
events
[
0
]).
assertEqual
(
"
publish_event0400
"
);
Subscriber
.
subscribe
(
commonEventSubscriber0401
,
subscriberCallBack0401
);
setTimeout
(
function
()
{
console
.
debug
(
"
===================ActsSubscriberTestOrder_0400 delay 100mss==================
"
);
Subscriber
.
publish
(
"
publish_event0400
"
,
commonEventPublishData
,
publishCallback
);
},
100
);
})
})
})
...
...
@@ -518,7 +540,10 @@ describe('ActsSubscriberTestOrder', function () {
console
.
info
(
"
===============ActsSubscriberTestOrder_0500==========getSubscribeInfo promise2
"
);
expect
(
data
.
events
[
0
]).
assertEqual
(
"
publish_event0500
"
);
Subscriber
.
subscribe
(
commonEventSubscriber0501
,
subscriberCallBack0501
);
setTimeout
(
function
()
{
console
.
debug
(
"
===================ActsSubscriberTestOrder_0500 delay 100ms==================
"
);
Subscriber
.
publish
(
"
publish_event0500
"
,
commonEventPublishData
,
publishCallback
);
},
100
);
})
})
})
...
...
notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/default/pages/index/index.js
浏览文件 @
4c0583e0
...
...
@@ -34,6 +34,7 @@ export default {
core
.
addService
(
'
expect
'
,
expectExtend
)
core
.
init
()
const
configService
=
core
.
getDefaultService
(
'
config
'
)
this
.
timeout
=
100000
;
configService
.
setConfig
(
this
)
require
(
'
../../../test/List.test
'
)
...
...
notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/test/ActsSubscriber_test_unorder.js
浏览文件 @
4c0583e0
...
...
@@ -217,9 +217,6 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
Subscriber
.
publish
(
commonEventSubscribeInfo
.
events
[
i
],
publishCallback
);
}
})
setTimeout
(
function
(){
console
.
debug
(
"
===================>ActsSubscriberTestUnorderSystem_0100 end==================
"
);
},
30000
);
})
/*
...
...
@@ -295,9 +292,6 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
Subscriber
.
publish
(
commonEventSubscribeInfo
.
events
[
i
],
publishCallback
);
}
})
setTimeout
(
function
(){
console
.
debug
(
"
===================>ActsSubscriberTestUnorderSystem_0200 end==================
"
);
},
30000
);
})
})
notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/test/ActsSubscriber_test_unorder.js
浏览文件 @
4c0583e0
...
...
@@ -425,7 +425,8 @@ describe('ActsSubscriberTestUnorder', async function (done) {
},
1000
);
});
});
sleep
(
5
);
sleep
(
1000
);
})
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录