Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
b054ffac
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看板
提交
b054ffac
编写于
5月 11, 2023
作者:
Z
zhaimengchao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【Account】【Master】Xts execution time sequence problem
Signed-off-by:
N
zhaimengchao
<
zhaimengchao@huawei.com
>
上级
5cbd7cdc
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
101 addition
and
93 deletion
+101
-93
account/appaccount/actsaccountoperatetest/src/main/js/test/ChangeOnOff.js
...nt/actsaccountoperatetest/src/main/js/test/ChangeOnOff.js
+67
-63
account/appaccount/actsaccounttest/src/main/js/test/OnOff.js
account/appaccount/actsaccounttest/src/main/js/test/OnOff.js
+34
-30
未找到文件。
account/appaccount/actsaccountoperatetest/src/main/js/test/ChangeOnOff.js
浏览文件 @
b054ffac
...
...
@@ -55,8 +55,7 @@ export default function ActsAccountOnOff() {
* the credential
*/
it
(
'
ActsAccountOnOff_0300
'
,
0
,
async
function
(
done
)
{
testInit
();
await
sleep
(
500
);
await
testInit
();
console
.
debug
(
"
====>ActsAccountOnOff_0300 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -72,26 +71,27 @@ export default function ActsAccountOnOff() {
expect
(
err
).
assertEqual
(
null
);
done
();
}
function
subscriberCallback
(
err
,
data
){
async
function
subscriberCallback
(
err
,
data
){
console
.
debug
(
"
====>subscriberCallback 0300 data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
).
assertEqual
(
"
account_on_change_setcredential
"
);
expect
(
data
.
data
).
assertEqual
(
"
SUCCESS
"
);
commonevent
.
unsubscribe
(
subscriber
,
unSubscriberCallback
);
await
sleep
(
1000
)
appAccountManager
.
removeAccount
(
"
onoff_setcredential
"
,
removeAccountCallback
);
}
async
function
publishCallback
(
err
){
console
.
debug
(
"
====>publish call back err:
"
+
JSON
.
stringify
(
err
));
await
sleep
(
500
)
console
.
debug
(
"
====>setCredential start====
"
);
try
{
await
appAccountManager
.
setCredential
(
"
onoff_setcredential
"
,
"
credentialType
"
,
"
credential
"
);
}
catch
(
err
){
console
.
error
(
"
====>setCredential fail err:
"
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
}
console
.
debug
(
"
====>setCredential finish====
"
);
console
.
debug
(
"
====>setCredential start====
"
);
try
{
await
appAccountManager
.
setCredential
(
"
onoff_setcredential
"
,
"
credentialType
"
,
"
credential
"
);
}
catch
(
err
){
console
.
error
(
"
====>setCredential fail err:
"
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
}
console
.
debug
(
"
====>setCredential finish====
"
);
}
var
commonEventSubscribeInfo
=
{
events
:
[
"
account_on_change_setcredential
"
]
...
...
@@ -106,7 +106,7 @@ export default function ActsAccountOnOff() {
var
commonEventPublishData
=
{
code
:
9
}
await
sleep
(
10
00
)
await
sleep
(
5
00
)
console
.
debug
(
"
====>publish event account_on_change 0300====
"
);
commonevent
.
publish
(
"
account_on_change
"
,
commonEventPublishData
,
publishCallback
);
});
...
...
@@ -118,8 +118,7 @@ export default function ActsAccountOnOff() {
* authorized account
*/
it
(
'
ActsAccountOnOff_0400
'
,
0
,
async
function
(
done
)
{
testInit
();
await
sleep
(
500
);
await
testInit
();
console
.
debug
(
"
====>ActsAccountOnOff_0400 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -139,26 +138,27 @@ export default function ActsAccountOnOff() {
expect
(
err
).
assertEqual
(
null
);
done
();
}
function
subscriberCallback
(
err
,
data
){
async
function
subscriberCallback
(
err
,
data
){
console
.
debug
(
"
====>subscriberCallback 0400 data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
).
assertEqual
(
"
account_on_remove_another
"
);
expect
(
data
.
data
).
assertEqual
(
"
SUCCESS
"
);
commonevent
.
unsubscribe
(
subscriber
,
unSubscriberCallback
);
await
sleep
(
1000
)
appAccountManager
.
removeAccount
(
"
onoff_removeFir
"
,
removeAccountCallback
);
}
async
function
publishCallback
(
err
){
console
.
debug
(
"
====>publish call back err:
"
+
JSON
.
stringify
(
err
));
await
sleep
(
500
)
console
.
debug
(
"
====>removeAccount start====
"
);
try
{
await
appAccountManager
.
removeAccount
(
"
onoff_removeSec
"
);
}
catch
(
err
){
console
.
error
(
"
====>removeAccount fail err:
"
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
}
console
.
debug
(
"
====>removeAccount finish====
"
);
console
.
debug
(
"
====>removeAccount start====
"
);
try
{
await
appAccountManager
.
removeAccount
(
"
onoff_removeSec
"
);
}
catch
(
err
){
console
.
error
(
"
====>removeAccount fail err:
"
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
}
console
.
debug
(
"
====>removeAccount finish====
"
);
}
var
commonEventSubscribeInfo
=
{
events
:
[
"
account_on_remove_another
"
]
...
...
@@ -173,9 +173,9 @@ export default function ActsAccountOnOff() {
var
commonEventPublishData
=
{
code
:
10
}
await
sleep
(
10
00
)
console
.
debug
(
"
====>publish event account_on_change 0400====
"
);
commonevent
.
publish
(
"
account_on_change
"
,
commonEventPublishData
,
publishCallback
);
await
sleep
(
5
00
)
console
.
debug
(
"
====>publish event account_on_change 0400====
"
);
commonevent
.
publish
(
"
account_on_change
"
,
commonEventPublishData
,
publishCallback
);
});
/*
...
...
@@ -185,8 +185,7 @@ export default function ActsAccountOnOff() {
* the only authorized account
*/
it
(
'
ActsAccountOnOff_0500
'
,
0
,
async
function
(
done
)
{
testInit
();
await
sleep
(
500
);
await
testInit
();
console
.
debug
(
"
====>ActsAccountOnOff_0500 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -197,26 +196,31 @@ export default function ActsAccountOnOff() {
function
unSubscriberCallback
(
err
){
console
.
debug
(
"
====>unsubscribe 0500 err:
"
+
JSON
.
stringify
(
err
));
}
function
subscriberCallback
(
err
,
data
){
function
removeAccountCallback
(
err
){
console
.
debug
(
"
====>remove account 0500 err:
"
+
JSON
.
stringify
(
err
));
done
();
}
async
function
subscriberCallback
(
err
,
data
){
console
.
debug
(
"
====>subscriberCallback 0500 data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
).
assertEqual
(
"
account_on_change_remove
"
);
expect
(
data
.
data
).
assertEqual
(
"
SUCCESS
"
);
commonevent
.
unsubscribe
(
subscriber
,
unSubscriberCallback
);
done
();
await
sleep
(
1000
)
appAccountManager
.
removeAccount
(
"
onoff_remove
"
,
removeAccountCallback
);
}
async
function
publishCallback
(
err
){
console
.
debug
(
"
====>publish call back err:
"
+
JSON
.
stringify
(
err
));
await
sleep
(
500
)
console
.
debug
(
"
====>removeAccount start====
"
);
try
{
await
appAccountManager
.
removeAccount
(
"
onoff_remove
"
);
}
catch
(
err
){
console
.
error
(
"
====>removeAccount fail err:
"
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
}
console
.
debug
(
"
====>removeAccount finish====
"
);
console
.
debug
(
"
====>removeAccount start====
"
);
try
{
await
appAccountManager
.
removeAccount
(
"
onoff_remove
"
);
}
catch
(
err
){
console
.
error
(
"
====>removeAccount fail err:
"
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
}
console
.
debug
(
"
====>removeAccount finish====
"
);
}
var
commonEventSubscribeInfo
=
{
events
:
[
"
account_on_change_remove
"
]
...
...
@@ -231,9 +235,9 @@ export default function ActsAccountOnOff() {
var
commonEventPublishData
=
{
code
:
11
}
await
sleep
(
10
00
)
console
.
debug
(
"
====>publish event account_on_change 0500====
"
);
commonevent
.
publish
(
"
account_on_change
"
,
commonEventPublishData
,
publishCallback
);
await
sleep
(
5
00
)
console
.
debug
(
"
====>publish event account_on_change 0500====
"
);
commonevent
.
publish
(
"
account_on_change
"
,
commonEventPublishData
,
publishCallback
);
});
/*
...
...
@@ -243,8 +247,7 @@ export default function ActsAccountOnOff() {
* authorized account
*/
it
(
'
ActsAccountOnOff_0600
'
,
0
,
async
function
(
done
)
{
testInit
();
await
sleep
(
500
);
await
testInit
();
console
.
debug
(
"
====>ActsAccountOnOff_0600 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -268,26 +271,27 @@ export default function ActsAccountOnOff() {
done
();
});
}
function
subscriberCallback
(
err
,
data
){
async
function
subscriberCallback
(
err
,
data
){
console
.
debug
(
"
====>subscriberCallback 0600 data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
).
assertEqual
(
"
account_on_set_another_disable
"
);
expect
(
data
.
data
).
assertEqual
(
"
SUCCESS
"
);
commonevent
.
unsubscribe
(
subscriber
,
unSubscriberCallback
);
await
sleep
(
1000
)
appAccountManager
.
removeAccount
(
"
onoff_disableFir
"
,
removeAccountCallback
);
}
async
function
publishCallback
(
err
){
console
.
debug
(
"
====>publish call back err:
"
+
JSON
.
stringify
(
err
));
await
sleep
(
500
)
console
.
debug
(
"
====>disableAppAccess start====
"
);
try
{
await
appAccountManager
.
setAppAccess
(
"
onoff_disableSec
"
,
"
com.example.actsaccountsceneonoff
"
,
false
);
}
catch
(
err
){
console
.
error
(
"
====>disableAppAccess fail err:
"
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
}
console
.
debug
(
"
====>disableAppAccess finish====
"
);
console
.
debug
(
"
====>disableAppAccess start====
"
);
try
{
await
appAccountManager
.
setAppAccess
(
"
onoff_disableSec
"
,
"
com.example.actsaccountsceneonoff
"
,
false
);
}
catch
(
err
){
console
.
error
(
"
====>disableAppAccess fail err:
"
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
}
console
.
debug
(
"
====>disableAppAccess finish====
"
);
}
var
commonEventSubscribeInfo
=
{
events
:
[
"
account_on_set_another_disable
"
]
...
...
@@ -302,9 +306,9 @@ export default function ActsAccountOnOff() {
var
commonEventPublishData
=
{
code
:
12
}
await
sleep
(
10
00
)
console
.
debug
(
"
====>publish event account_on_change 0600====
"
);
commonevent
.
publish
(
"
account_on_change
"
,
commonEventPublishData
,
publishCallback
);
await
sleep
(
5
00
)
console
.
debug
(
"
====>publish event account_on_change 0600====
"
);
commonevent
.
publish
(
"
account_on_change
"
,
commonEventPublishData
,
publishCallback
);
});
})
...
...
account/appaccount/actsaccounttest/src/main/js/test/OnOff.js
浏览文件 @
b054ffac
...
...
@@ -59,8 +59,7 @@ export default function ActsAccountChangeOnOff() {
* the additional information
*/
it
(
'
ActsAccountChangeOnOff_0100
'
,
0
,
async
function
(
done
)
{
testInit
();
await
sleep
(
1000
);
await
testInit
();
console
.
debug
(
"
====>ActsAccountChangeOnOff_0100 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -81,11 +80,12 @@ export default function ActsAccountChangeOnOff() {
expect
(
err
).
assertEqual
(
null
);
appAccountManager
.
deleteAccount
(
"
changeonoff_extra
"
,
deleteAccountCallback
);
}
function
subscriberCallback
(
err
,
data
){
async
function
subscriberCallback
(
err
,
data
){
console
.
debug
(
"
====>subscriberCallback 0100 data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
).
assertEqual
(
"
account_on_change_extra
"
);
expect
(
data
.
data
).
assertEqual
(
"
SUCCESS
"
);
commonevent
.
unsubscribe
(
subscriber
,
unSubscriberCallback
);
await
sleep
(
1000
)
appAccountManager
.
disableAppAccess
(
"
changeonoff_extra
"
,
"
com.example.actsaccountsceneonoff
"
,
disCallback
);
}
function
publishCallback
(
err
){
...
...
@@ -119,7 +119,7 @@ export default function ActsAccountChangeOnOff() {
setTimeout
(
function
(){
console
.
debug
(
"
====>publish event account_on_change 0100====
"
);
commonevent
.
publish
(
"
account_on_change
"
,
commonEventPublishData
,
publishCallback
);
},
10
00
);
},
5
00
);
});
/*
...
...
@@ -129,8 +129,7 @@ export default function ActsAccountChangeOnOff() {
* the associatal data
*/
it
(
'
ActsAccountChangeOnOff_0200
'
,
0
,
async
function
(
done
)
{
testInit
();
await
sleep
(
1000
);
await
testInit
();
console
.
debug
(
"
====>ActsAccountChangeOnOff_0200 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -146,11 +145,12 @@ export default function ActsAccountChangeOnOff() {
expect
(
err
).
assertEqual
(
null
);
done
();
}
function
subscriberCallback
(
err
,
data
){
async
function
subscriberCallback
(
err
,
data
){
console
.
debug
(
"
====>subscriberCallback 0200 data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
).
assertEqual
(
"
account_on_change_associatedata
"
);
expect
(
data
.
data
).
assertEqual
(
"
SUCCESS
"
);
commonevent
.
unsubscribe
(
subscriber
,
unSubscriberCallback
);
await
sleep
(
1000
)
appAccountManager
.
deleteAccount
(
"
onoff_associatedata
"
,
deleteAccountCallback
);
}
function
publishCallback
(
err
){
...
...
@@ -184,7 +184,7 @@ export default function ActsAccountChangeOnOff() {
setTimeout
(
function
(){
console
.
debug
(
"
====>publish event account_on_change 0200====
"
);
commonevent
.
publish
(
"
account_on_change
"
,
commonEventPublishData
,
publishCallback
);
},
10
00
);
},
5
00
);
});
/*
...
...
@@ -194,8 +194,7 @@ export default function ActsAccountChangeOnOff() {
* the credential
*/
it
(
'
ActsAccountChangeOnOff_0300
'
,
0
,
async
function
(
done
)
{
testInit
();
await
sleep
(
1000
);
await
testInit
();
console
.
debug
(
"
====>ActsAccountChangeOnOff_0300 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -211,11 +210,12 @@ export default function ActsAccountChangeOnOff() {
expect
(
err
).
assertEqual
(
null
);
done
();
}
function
subscriberCallback
(
err
,
data
){
async
function
subscriberCallback
(
err
,
data
){
console
.
debug
(
"
====>subscriberCallback 0300 data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
).
assertEqual
(
"
account_on_change_credential
"
);
expect
(
data
.
data
).
assertEqual
(
"
SUCCESS
"
);
commonevent
.
unsubscribe
(
subscriber
,
unSubscriberCallback
);
await
sleep
(
1000
)
appAccountManager
.
deleteAccount
(
"
onoff_credential
"
,
deleteAccountCallback
);
}
function
publishCallback
(
err
){
...
...
@@ -249,7 +249,7 @@ export default function ActsAccountChangeOnOff() {
setTimeout
(
function
(){
console
.
debug
(
"
====>publish event account_on_change 0300====
"
);
commonevent
.
publish
(
"
account_on_change
"
,
commonEventPublishData
,
publishCallback
);
},
10
00
);
},
5
00
);
});
/*
...
...
@@ -259,8 +259,7 @@ export default function ActsAccountChangeOnOff() {
* authorized account
*/
it
(
'
ActsAccountChangeOnOff_0400
'
,
0
,
async
function
(
done
)
{
testInit
();
await
sleep
(
1000
);
await
testInit
();
console
.
debug
(
"
====>ActsAccountChangeOnOff_0400 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -280,11 +279,12 @@ export default function ActsAccountChangeOnOff() {
expect
(
err
).
assertEqual
(
null
);
done
();
}
function
subscriberCallback
(
err
,
data
){
async
function
subscriberCallback
(
err
,
data
){
console
.
debug
(
"
====>subscriberCallback 0400 data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
).
assertEqual
(
"
account_on_delete_another
"
);
expect
(
data
.
data
).
assertEqual
(
"
SUCCESS
"
);
commonevent
.
unsubscribe
(
subscriber
,
unSubscriberCallback
);
await
sleep
(
1000
)
appAccountManager
.
deleteAccount
(
"
onoff_deleteFir
"
,
deleteAccountCallback
);
}
function
publishCallback
(
err
){
...
...
@@ -318,7 +318,7 @@ export default function ActsAccountChangeOnOff() {
setTimeout
(
function
(){
console
.
debug
(
"
====>publish event account_on_change 0400====
"
);
commonevent
.
publish
(
"
account_on_change
"
,
commonEventPublishData
,
publishCallback
);
},
10
00
);
},
5
00
);
});
/*
...
...
@@ -328,8 +328,7 @@ export default function ActsAccountChangeOnOff() {
* the only authorized account
*/
it
(
'
ActsAccountChangeOnOff_0500
'
,
0
,
async
function
(
done
)
{
testInit
();
await
sleep
(
1000
);
await
testInit
();
console
.
debug
(
"
====>ActsAccountChangeOnOff_0500 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -340,12 +339,17 @@ export default function ActsAccountChangeOnOff() {
function
unSubscriberCallback
(
err
){
console
.
debug
(
"
====>unsubscribe 0500 err:
"
+
JSON
.
stringify
(
err
));
}
function
subscriberCallback
(
err
,
data
){
function
deleteAccountCallback
(
err
){
console
.
debug
(
"
====>delete account 0500 err:
"
+
JSON
.
stringify
(
err
));
done
();
}
async
function
subscriberCallback
(
err
,
data
){
console
.
debug
(
"
====>subscriberCallback 0500 data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
).
assertEqual
(
"
account_on_change_delete
"
);
expect
(
data
.
data
).
assertEqual
(
"
SUCCESS
"
);
commonevent
.
unsubscribe
(
subscriber
,
unSubscriberCallback
);
done
();
await
sleep
(
1000
)
appAccountManager
.
deleteAccount
(
"
onoff_delete
"
,
deleteAccountCallback
);
}
function
publishCallback
(
err
){
console
.
debug
(
"
====>publish call back err:
"
+
JSON
.
stringify
(
err
));
...
...
@@ -355,7 +359,7 @@ export default function ActsAccountChangeOnOff() {
await
appAccountManager
.
deleteAccount
(
"
onoff_delete
"
);
}
catch
(
err
){
console
.
error
(
"
====>deleteAccount fail err:
"
+
JSON
.
stringify
(
err
));
console
.
error
(
"
====>deleteAccount fail err:
"
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
}
...
...
@@ -378,7 +382,7 @@ export default function ActsAccountChangeOnOff() {
setTimeout
(
function
(){
console
.
debug
(
"
====>publish event account_on_change 0500====
"
);
commonevent
.
publish
(
"
account_on_change
"
,
commonEventPublishData
,
publishCallback
);
},
10
00
);
},
5
00
);
});
/*
...
...
@@ -388,8 +392,7 @@ export default function ActsAccountChangeOnOff() {
* authorized account
*/
it
(
'
ActsAccountChangeOnOff_0600
'
,
0
,
async
function
(
done
)
{
testInit
();
await
sleep
(
1000
);
await
testInit
();
console
.
debug
(
"
====>ActsAccountChangeOnOff_0600 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -413,11 +416,12 @@ export default function ActsAccountChangeOnOff() {
done
();
});
}
function
subscriberCallback
(
err
,
data
){
async
function
subscriberCallback
(
err
,
data
){
console
.
debug
(
"
====>subscriberCallback 0600 data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
).
assertEqual
(
"
account_on_disable_another
"
);
expect
(
data
.
data
).
assertEqual
(
"
SUCCESS
"
);
commonevent
.
unsubscribe
(
subscriber
,
unSubscriberCallback
);
await
sleep
(
1000
)
appAccountManager
.
deleteAccount
(
"
onoff_enableFir
"
,
deleteAccountCallback
);
}
function
publishCallback
(
err
){
...
...
@@ -451,7 +455,7 @@ export default function ActsAccountChangeOnOff() {
setTimeout
(
function
(){
console
.
debug
(
"
====>publish event account_on_change 0600====
"
);
commonevent
.
publish
(
"
account_on_change
"
,
commonEventPublishData
,
publishCallback
);
},
10
00
);
},
5
00
);
});
/*
...
...
@@ -461,8 +465,7 @@ export default function ActsAccountChangeOnOff() {
* the only authorized account
*/
it
(
'
ActsAccountChangeOnOff_0700
'
,
0
,
async
function
(
done
)
{
testInit
();
await
sleep
(
1000
);
await
testInit
();
console
.
debug
(
"
====>ActsAccountChangeOnOff_0700 start====
"
);
var
appAccountManager
=
account
.
createAppAccountManager
();
console
.
debug
(
"
====>creat appAccountManager finish
"
);
...
...
@@ -478,11 +481,12 @@ export default function ActsAccountChangeOnOff() {
expect
(
err
).
assertEqual
(
null
);
done
();
}
function
subscriberCallback
(
err
,
data
){
async
function
subscriberCallback
(
err
,
data
){
console
.
debug
(
"
====>subscriberCallback 0700 data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
).
assertEqual
(
"
account_on_change_disable
"
);
expect
(
data
.
data
).
assertEqual
(
"
SUCCESS
"
);
commonevent
.
unsubscribe
(
subscriber
,
unSubscriberCallback
);
await
sleep
(
1000
)
appAccountManager
.
deleteAccount
(
"
onoff_disable
"
,
deleteAccountCallback
);
}
function
publishCallback
(
err
){
...
...
@@ -516,7 +520,7 @@ export default function ActsAccountChangeOnOff() {
setTimeout
(
function
(){
console
.
debug
(
"
====>publish event account_on_change 0700====
"
);
commonevent
.
publish
(
"
account_on_change
"
,
commonEventPublishData
,
publishCallback
);
},
10
00
);
},
5
00
);
});
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录