Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
81805633
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看板
未验证
提交
81805633
编写于
3月 29, 2023
作者:
O
openharmony_ci
提交者:
Gitee
3月 29, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8280 【xts_acts】【OpenHarmony-3.2-Release】修改优化kv测试用例
Merge pull request !8280 from 于小雅/3.2Release_0329
上级
9ced5659
854de3b1
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
167 addition
and
154 deletion
+167
-154
distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvStoreBackupCallbackJsTest.js
...stest/hap/src/main/js/test/KvStoreBackupCallbackJsTest.js
+93
-82
distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvStoreBackupPromiseJsTest.js
...jstest/hap/src/main/js/test/KvStoreBackupPromiseJsTest.js
+74
-72
未找到文件。
distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvStoreBackupCallbackJsTest.js
浏览文件 @
81805633
...
...
@@ -32,7 +32,7 @@ let mKVMgrConfig = {
function
sleep
(
ms
)
{
return
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
ms
));
}
function
public
g
etKvStore
(
optionsp
){
function
public
G
etKvStore
(
optionsp
){
console
.
log
(
`Test getKvStore `
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvManager
=
distributedData
.
createKVManager
(
mKVMgrConfig
);
...
...
@@ -49,7 +49,7 @@ function publicgetKvStore(optionsp){
})
}
function
public
c
loseKvStore
()
{
function
public
C
loseKvStore
()
{
console
.
log
(
`Test closeKvStore `
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvManager
.
closeKVStore
(
BUNDLE_NAME
,
STORE_ID
,
kvStore
,
(
err
,
data
)
=>
{
...
...
@@ -71,7 +71,7 @@ function publiccloseKvStore() {
})
}
function
public
p
ut
(
kvStore
,
key
,
value
){
function
public
P
ut
(
kvStore
,
key
,
value
){
console
.
log
(
`Test put
${
JSON
.
stringify
(
key
,
value
)}
`
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvStore
.
put
(
key
,
value
,
function
(
err
,
data
){
...
...
@@ -86,7 +86,7 @@ function publicput(kvStore,key,value){
})
}
function
public
g
et
(
kvStore
,
key
){
function
public
G
et
(
kvStore
,
key
){
console
.
log
(
`Test get
${
JSON
.
stringify
(
key
)}
`
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvStore
.
get
(
key
,
function
(
err
,
data
){
...
...
@@ -101,7 +101,7 @@ function publicget(kvStore,key){
})
}
function
public
b
ackup
(
kvStore
,
file
){
function
public
B
ackup
(
kvStore
,
file
){
console
.
log
(
`Test backup
${
JSON
.
stringify
(
file
)}
`
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvStore
.
backup
(
file
,
function
(
err
,
data
){
...
...
@@ -116,7 +116,7 @@ function publicbackup(kvStore,file){
})
}
function
public
d
eleteBackup
(
kvStore
,
files
){
function
public
D
eleteBackup
(
kvStore
,
files
){
console
.
log
(
`Test deleteBackup
${
JSON
.
stringify
(
files
)}
`
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvStore
.
deleteBackup
(
files
,
function
(
err
,
data
){
...
...
@@ -135,7 +135,7 @@ function publicdeleteBackup(kvStore,files){
})
}
function
public
restores
p
(
kvStore
,
file
){
function
public
RestoreS
p
(
kvStore
,
file
){
console
.
log
(
`Test restoresp
${
JSON
.
stringify
(
file
)}
`
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvStore
.
restore
(
file
,
function
(
err
,
data
){
...
...
@@ -151,7 +151,7 @@ function publicrestoresp(kvStore,file){
})
}
function
public
r
estore
(
kvStore
){
function
public
R
estore
(
kvStore
){
console
.
log
(
`Test restore `
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvStore
.
restore
(
function
(
err
,
data
){
...
...
@@ -183,25 +183,25 @@ describe('kvStoreBackupCallbackJsunittest', function () {
beforeAll
(
async
function
()
{
console
.
info
(
'
Test beforeAll: Prerequisites at the test suite level,
'
+
'
which are executed before t he test suite is executed.
'
);
await
public
g
etKvStore
(
optionLock
);
await
public
G
etKvStore
(
optionLock
);
console
.
info
(
"
Test kvstore =
"
+
kvStore
)
})
beforeEach
(
async
function
()
{
console
.
info
(
'
beforeEach: Prerequisites at the test case level,
'
+
'
which are executed before each test case is executed.
'
);
await
public
g
etKvStore
(
optionLock
);
await
public
G
etKvStore
(
optionLock
);
})
afterEach
(
async
function
()
{
console
.
info
(
'
afterEach: Test case-level clearance conditions,
'
+
'
which are executed after each test case is executed.
'
);
await
public
d
eleteBackup
(
kvStore
,
files
);
await
public
c
loseKvStore
();
await
public
D
eleteBackup
(
kvStore
,
files
);
await
public
C
loseKvStore
();
files
=
[]
})
afterAll
(
async
function
()
{
console
.
info
(
'
afterAll: Test suite-level cleanup condition,
'
+
'
which is executed after the test suite is executed
'
);
await
public
c
loseKvStore
();
await
public
C
loseKvStore
();
kvManager
=
null
;
console
.
info
(
"
Test kvstore =
"
+
kvStore
)
})
...
...
@@ -215,13 +215,13 @@ describe('kvStoreBackupCallbackJsunittest', function () {
it
(
'
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_CALLBACK_0100
'
,
0
,
async
function
(
done
)
{
try
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_CALLBACK_0100 before restore
"
);
await
publicr
estore
(
kvStore
).
then
((
data
)
=>
{
publicR
estore
(
kvStore
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_CALLBACK_0100 going restore =
"
+
JSON
.
stringify
(
data
));
expect
(
true
).
assertEqual
(
true
);
expect
(
).
assertFail
(
);
done
();
}).
catch
((
err
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_CALLBACK_0100 Manualrestore fail 1
"
+
err
);
expect
(
true
).
assertEqual
(
err
==
"
Error: Parameter error.The number of parameters is incorrect.
"
);
expect
(
err
==
"
Error: Parameter error.The number of parameters is incorrect.
"
).
assertEqual
(
true
);
done
();
})
}
catch
(
e
)
{
...
...
@@ -231,6 +231,8 @@ describe('kvStoreBackupCallbackJsunittest', function () {
}
})
/**
* @tc.name SUB_DDM_DKV_KVBACKUP_MANALRESTORE_CALLBACK_0200
* @tc.desc Test Js Api SingleKvStore.restore() manal testcase 002
...
...
@@ -242,18 +244,18 @@ describe('kvStoreBackupCallbackJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_CALLBACK_0200 before getname
"
);
file
=
'
123
'
;
files
[
0
]
=
file
;
public
b
ackup
(
kvStore
,
file
)
;
public
B
ackup
(
kvStore
,
file
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_CALLBACK_0200 before restore
"
);
await
sleep
(
1000
);
public
r
estore
(
kvStore
);
public
R
estore
(
kvStore
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_CALLBACK_0200 going restore
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_CALLBACK_0200 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_CALLBACK_0200 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_CALLBACK_0200 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_CALLBACK_0200 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -276,15 +278,15 @@ describe('kvStoreBackupCallbackJsunittest', function () {
file
=
'
true
'
;
files
[
0
]
=
file
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_BUCKUP_CALLBACK_0100 before backup
"
);
public
b
ackup
(
kvStore
,
file
)
;
public
B
ackup
(
kvStore
,
file
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_BUCKUP_CALLBACK_0100 going backup
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_BUCKUP_CALLBACK_0100 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_BUCKUP_CALLBACK_0100 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_BUCKUP_CALLBACK_0100 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_BUCKUP_CALLBACK_0100 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -307,15 +309,15 @@ describe('kvStoreBackupCallbackJsunittest', function () {
file
=
'
legal
'
;
files
[
0
]
=
"
legal
"
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0100 before backup
"
);
public
b
ackup
(
kvStore
,
file
)
;
public
B
ackup
(
kvStore
,
file
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0100 going backup
"
);
await
sleep
(
1000
);
await
public
d
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
await
public
D
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0100 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0100 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0100 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0100 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -336,15 +338,15 @@ describe('kvStoreBackupCallbackJsunittest', function () {
file
=
'
1
'
;
files
[
0
]
=
file
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0200 before backup
"
);
public
b
ackup
(
kvStore
,
file
)
;
public
B
ackup
(
kvStore
,
file
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0200 going backup
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0200 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0200 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0200 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0200 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -366,15 +368,15 @@ describe('kvStoreBackupCallbackJsunittest', function () {
file
=
'
1.0
'
;
files
[
0
]
=
file
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0300 before backup
"
);
public
b
ackup
(
kvStore
,
file
)
;
public
B
ackup
(
kvStore
,
file
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0300 going backup
"
);
await
sleep
(
1000
);
await
public
d
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
await
public
D
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0300 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0300 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0300 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0300 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -395,9 +397,9 @@ describe('kvStoreBackupCallbackJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0400 before getname
"
);
file
=
''
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0400 before backup
"
);
await
public
b
ackup
(
kvStore
,
file
).
then
((
data
)
=>
{
await
public
B
ackup
(
kvStore
,
file
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0400 going backup
"
);
expect
(
true
).
assertEqual
(
data
==
"
code数字
"
);
expect
(
).
assertFail
(
);
done
();
}).
catch
((
err
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0400 ManualbackupCallback002 fail1
"
+
err
);
...
...
@@ -432,20 +434,20 @@ describe('kvStoreBackupCallbackJsunittest', function () {
files
[
3
]
=
file3
;
files
[
4
]
=
file4
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0500 before backup
"
);
public
b
ackup
(
kvStore
,
file
);
public
B
ackup
(
kvStore
,
file
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file1
);
public
B
ackup
(
kvStore
,
file1
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file2
);
public
B
ackup
(
kvStore
,
file2
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file3
);
public
B
ackup
(
kvStore
,
file3
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file4
);
public
B
ackup
(
kvStore
,
file4
);
await
sleep
(
500
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0500 before public
d
eleteBackup
"
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0500 before public
D
eleteBackup
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
expect
(
"
1
"
).
assertEqual
(
delresult
[
0
][
0
])
expect
(
0
).
assertEqual
(
delresult
[
0
][
1
]);
...
...
@@ -462,9 +464,10 @@ describe('kvStoreBackupCallbackJsunittest', function () {
expect
(
"
5
"
).
assertEqual
(
delresult
[
4
][
0
])
expect
(
27459591
).
assertEqual
(
delresult
[
4
][
1
])
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0500 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0500 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
files
=
[];
console
.
log
(
"
Test clear files
"
);
expect
(
data
!=
null
).
assertTrue
();
done
();
})
}
catch
(
e
)
{
...
...
@@ -497,18 +500,18 @@ describe('kvStoreBackupCallbackJsunittest', function () {
files
[
4
]
=
file4
;
files
[
5
]
=
file5
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0600 before backup
"
);
public
b
ackup
(
kvStore
,
file
);
public
B
ackup
(
kvStore
,
file
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file1
);
public
B
ackup
(
kvStore
,
file1
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file2
);
public
B
ackup
(
kvStore
,
file2
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file3
);
public
B
ackup
(
kvStore
,
file3
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file4
);
public
B
ackup
(
kvStore
,
file4
);
await
sleep
(
500
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0600 before Sixth backup
"
);
await
publicb
ackup
(
kvStore
,
file5
).
then
((
data
)
=>
{
publicB
ackup
(
kvStore
,
file5
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0600 going backup
"
);
expect
(
true
).
assertEqual
(
data
==
"
code数字
"
);
done
();
...
...
@@ -519,8 +522,8 @@ describe('kvStoreBackupCallbackJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0600 Sixth backup err
"
);
})
await
sleep
(
1000
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0600 before public
d
eleteBackup
"
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0600 before public
D
eleteBackup
"
);
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
expect
(
"
1
"
).
assertEqual
(
delresult
[
0
][
0
])
expect
(
0
).
assertEqual
(
delresult
[
0
][
1
]);
...
...
@@ -531,9 +534,10 @@ describe('kvStoreBackupCallbackJsunittest', function () {
expect
(
"
6
"
).
assertEqual
(
delresult
[
5
][
0
])
expect
(
27459591
).
assertEqual
(
delresult
[
5
][
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0600 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_CALLBACK_0600 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
files
=
[];
console
.
log
(
"
Test clear files
"
);
expect
(
data
!=
null
).
assertTrue
();
done
();
})
}
catch
(
e
)
{
...
...
@@ -554,18 +558,18 @@ describe('kvStoreBackupCallbackJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0100 before getname
"
);
file
=
'
legal
'
;
files
[
0
]
=
file
;
public
b
ackup
(
kvStore
,
file
);
public
B
ackup
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0100 before restoresp
"
);
await
sleep
(
1000
);
public
restores
p
(
kvStore
,
file
);
public
RestoreS
p
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0100 going restoresp
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0100 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0100 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0100 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0100 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -586,18 +590,18 @@ describe('kvStoreBackupCallbackJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0200 before getname
"
);
file
=
'
true
'
;
files
[
0
]
=
file
;
public
b
ackup
(
kvStore
,
file
);
public
B
ackup
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0200 before restoresp
"
);
await
sleep
(
1000
);
public
restores
p
(
kvStore
,
file
);
public
RestoreS
p
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0200 going restoresp
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0200 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0200 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0200 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0200 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -618,18 +622,18 @@ describe('kvStoreBackupCallbackJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0300 before getname
"
);
file
=
'
1
'
;
files
[
0
]
=
file
;
public
b
ackup
(
kvStore
,
file
);
public
B
ackup
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0300 before restoresp
"
);
await
sleep
(
1000
);
public
restores
p
(
kvStore
,
file
);
public
RestoreS
p
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0300 going restoresp
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0300 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0300 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0300 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0300 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -650,18 +654,18 @@ describe('kvStoreBackupCallbackJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0400 before getname
"
);
file
=
'
1.0
'
;
files
[
0
]
=
file
;
public
b
ackup
(
kvStore
,
file
);
public
B
ackup
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0400 before restoresp
"
);
await
sleep
(
1000
);
public
restores
p
(
kvStore
,
file
);
public
RestoreS
p
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0400 going restoresp
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0400 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0400 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0400 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0400 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -681,10 +685,10 @@ describe('kvStoreBackupCallbackJsunittest', function () {
try
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0500 before getname
"
);
file
=
''
;
public
b
ackup
(
kvStore
,
file
)
;
public
B
ackup
(
kvStore
,
file
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0500 before restoresp
"
);
await
sleep
(
1000
);
await
publicrestores
p
(
kvStore
,
file
).
then
((
data
)
=>
{
publicRestoreS
p
(
kvStore
,
file
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0500 going restoresp =
"
+
JSON
.
stringify
(
data
));
expect
(
true
).
assertEqual
(
false
);
done
();
...
...
@@ -711,7 +715,7 @@ describe('kvStoreBackupCallbackJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0600 before getname
"
);
file
=
'
legal
'
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0600 before restoresp
"
);
await
publicrestores
p
(
kvStore
,
file
).
then
((
data
)
=>
{
publicRestoreS
p
(
kvStore
,
file
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORETOSPECIFIEDVERSION_CALLBACK_0600 going restoresp =
"
+
JSON
.
stringify
(
data
));
expect
(
true
).
assertEqual
(
false
);
done
();
...
...
@@ -738,12 +742,12 @@ describe('kvStoreBackupCallbackJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_DELETEBUCKUP_CALLBACK_0100 before deleteBackup
"
);
file
=
'
123
'
;
files
[
0
]
=
file
;
await
public
d
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
await
public
D
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_DELETEBUCKUP_CALLBACK_0100 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_DELETEBUCKUP_CALLBACK_0100 delResult[1] =
"
+
delResult
[
1
]);
expect
(
27459591
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_DELETEBUCKUP_CALLBACK_0100 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_DELETEBUCKUP_CALLBACK_0100 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_DELETEBUCKUP_CALLBACK_0100 going deleteBackup
"
);
...
...
@@ -763,9 +767,16 @@ describe('kvStoreBackupCallbackJsunittest', function () {
it
(
'
SUB_DDM_DKV_KVBACKUP_PUT_CALLBACK_0100
'
,
0
,
async
function
(
done
)
{
try
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_CALLBACK_0100 before putdata
"
);
publicput
(
kvStore
,
"
key
"
,
"
value
"
)
;
publicPut
(
kvStore
,
"
key
"
,
"
value
"
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_CALLBACK_0100 going putdata data=
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_CALLBACK_0100 going putdata
"
);
expect
(
data
==
undefined
).
assertTrue
();
done
();
}).
catch
((
err
)
=>
{
console
.
log
(
"
UB_DDM_DKV_KVBACKUP_PUT_CALLBACK_0100 fail 1
"
+
JSON
.
stringify
(
err
));
expect
(
err
).
assertFail
();
done
();
})
}
catch
(
e
)
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_CALLBACK_0100 Backupinfo fail
"
+
e
);
expect
(
e
).
assertFail
();
...
...
@@ -782,9 +793,9 @@ describe('kvStoreBackupCallbackJsunittest', function () {
it
(
'
SUB_DDM_DKV_KVBACKUP_PUT_CALLBACK_0200
'
,
0
,
async
function
(
done
)
{
try
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_CALLBACK_0200 before putdata
"
);
await
public
p
ut
(
kvStore
,
"
key
"
,
"
value
"
)
;
await
public
P
ut
(
kvStore
,
"
key
"
,
"
value
"
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_CALLBACK_0200 going putdata
"
);
await
publicg
et
(
kvStore
,
"
key
"
).
then
((
data
)
=>
{
publicG
et
(
kvStore
,
"
key
"
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_CALLBACK_0200 going getdata
"
+
JSON
.
stringify
(
data
));
expect
(
true
).
assertEqual
(
data
==
"
value
"
);
done
();
...
...
@@ -809,15 +820,15 @@ describe('kvStoreBackupCallbackJsunittest', function () {
it
(
'
SUB_DDM_DKV_KVBACKUP_PUT_CALLBACK_0300
'
,
0
,
async
function
(
done
)
{
try
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_CALLBACK_0300 before putdata
"
);
await
public
p
ut
(
kvStore
,
"
putcallback003
"
,
"
value1
"
)
;
await
public
P
ut
(
kvStore
,
"
putcallback003
"
,
"
value1
"
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_CALLBACK_0300 going putdata
"
);
await
publicg
et
(
kvStore
,
"
putcallback
"
).
then
((
data
)
=>
{
publicG
et
(
kvStore
,
"
putcallback
"
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_CALLBACK_0300 going getdata
"
+
JSON
.
stringify
(
data
));
expect
(
true
).
assertEqual
(
false
);
done
();
}).
catch
((
err
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_CALLBACK_0300 Get fail 1
"
+
JSON
.
stringify
(
err
));
expect
(
true
).
assertEqual
(
true
);
expect
(
err
.
code
).
assertEqual
(
"
15100004
"
);
done
();
})
}
catch
(
e
)
{
...
...
distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvStoreBackupPromiseJsTest.js
浏览文件 @
81805633
...
...
@@ -29,7 +29,7 @@ let mKVMgrConfig = {
context
:
context
};
function
public
g
etKvStore
(
optionsp
){
function
public
G
etKvStore
(
optionsp
){
console
.
log
(
`Test getKvStore `
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvManager
=
distributedData
.
createKVManager
(
mKVMgrConfig
);
...
...
@@ -46,7 +46,7 @@ function publicgetKvStore(optionsp){
})
}
function
public
c
loseKvStore
()
{
function
public
C
loseKvStore
()
{
console
.
log
(
`Test closeKvStore `
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvManager
.
closeKVStore
(
BUNDLE_NAME
,
STORE_ID
,
kvStore
,
(
err
,
data
)
=>
{
...
...
@@ -68,7 +68,7 @@ function publiccloseKvStore() {
})
}
function
public
p
ut
(
kvStore
,
key
,
value
){
function
public
P
ut
(
kvStore
,
key
,
value
){
console
.
log
(
`Test put
${
JSON
.
stringify
(
key
,
value
)}
`
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvStore
.
put
(
key
,
value
,
function
(
err
,
data
){
...
...
@@ -83,7 +83,7 @@ function publicput(kvStore,key,value){
})
}
function
public
g
et
(
kvStore
,
key
){
function
public
G
et
(
kvStore
,
key
){
console
.
log
(
`Test get
${
JSON
.
stringify
(
key
)}
`
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvStore
.
get
(
key
,
function
(
err
,
data
){
...
...
@@ -98,7 +98,7 @@ function publicget(kvStore,key){
})
}
function
public
b
ackup
(
kvStore
,
file
){
function
public
B
ackup
(
kvStore
,
file
){
console
.
log
(
`Test backup
${
JSON
.
stringify
(
file
)}
`
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvStore
.
backup
(
file
).
then
((
data
)
=>
{
...
...
@@ -111,7 +111,7 @@ function publicbackup(kvStore,file){
})
}
function
public
d
eleteBackup
(
kvStore
,
files
)
{
function
public
D
eleteBackup
(
kvStore
,
files
)
{
console
.
log
(
`Test deleteBackup
${
JSON
.
stringify
(
files
)}
`
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvStore
.
deleteBackup
(
files
).
then
((
data
)
=>
{
...
...
@@ -128,7 +128,7 @@ function publicdeleteBackup(kvStore,files) {
})
}
function
public
restores
p
(
kvStore
,
file
){
function
public
RestoreS
p
(
kvStore
,
file
){
console
.
log
(
`Test restoresp
${
JSON
.
stringify
(
file
)}
`
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvStore
.
restore
(
file
).
then
((
data
)
=>
{
...
...
@@ -141,7 +141,7 @@ function publicrestoresp(kvStore,file){
})
}
function
public
r
estore
(
kvStore
){
function
public
R
estore
(
kvStore
){
console
.
log
(
`Test restore `
)
return
new
Promise
(
function
(
resolve
,
reject
)
{
kvStore
.
restore
.
then
((
data
)
=>
{
...
...
@@ -174,7 +174,7 @@ describe('kvStoreBackupPromiseJsunittest', function () {
beforeAll
(
async
function
()
{
console
.
info
(
'
Test beforeAll: Prerequisites at the test suite level,
'
+
'
which are executed before the test suite is executed.
'
);
await
public
g
etKvStore
(
optionLock
);
await
public
G
etKvStore
(
optionLock
);
console
.
info
(
"
Test kvstore =
"
+
kvStore
)
})
beforeEach
(
function
()
{
...
...
@@ -184,12 +184,12 @@ describe('kvStoreBackupPromiseJsunittest', function () {
afterEach
(
async
function
()
{
console
.
info
(
'
afterEach: Test case-level clearance conditions,
'
+
'
which are executed after each test case is executed.
'
);
await
public
d
eleteBackup
(
kvStore
,
files
);
await
public
D
eleteBackup
(
kvStore
,
files
);
})
afterAll
(
async
function
()
{
console
.
info
(
'
afterAll: Test suite-level cleanup condition,
'
+
'
which is executed after the test suite is executed
'
);
await
public
c
loseKvStore
();
await
public
C
loseKvStore
();
kvManager
=
null
;
console
.
info
(
"
Test kvstore =
"
+
kvStore
)
})
...
...
@@ -203,7 +203,9 @@ describe('kvStoreBackupPromiseJsunittest', function () {
it
(
'
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_PROMISE_0100
'
,
0
,
async
function
(
done
)
{
try
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_PROMISE_0100 before restore
"
);
await
publicrestore
(
kvStore
).
then
((
data
)
=>
{
publicRestore
(
kvStore
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_PROMISE_0100 going restore =
"
+
JSON
.
stringify
(
data
));
expect
(
true
).
assertEqual
(
data
==
'
code数字
'
);
done
();
...
...
@@ -230,18 +232,18 @@ describe('kvStoreBackupPromiseJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_PROMISE_0200 before getname
"
);
file
=
'
123
'
;
files
[
0
]
=
file
;
public
b
ackup
(
kvStore
,
file
)
;
public
B
ackup
(
kvStore
,
file
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_PROMISE_0200 before restore
"
);
await
sleep
(
1000
);
public
r
estore
(
kvStore
);
public
R
estore
(
kvStore
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_PROMISE_0200 going restore
"
);
await
sleep
(
1000
);
await
public
d
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
await
public
D
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_PROMISE_0200 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_PROMISE_0200 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_PROMISE_0200 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALRESTORE_PROMISE_0200 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -263,15 +265,15 @@ describe('kvStoreBackupPromiseJsunittest', function () {
file
=
'
legal
'
;
files
[
0
]
=
"
legal
"
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0100 before backup
"
);
public
b
ackup
(
kvStore
,
file
)
;
public
B
ackup
(
kvStore
,
file
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0100 going backup
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0100 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0100 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0100 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0100 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -293,15 +295,15 @@ describe('kvStoreBackupPromiseJsunittest', function () {
file
=
'
true
'
;
files
[
0
]
=
file
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0200 before backup
"
);
public
b
ackup
(
kvStore
,
file
)
;
public
B
ackup
(
kvStore
,
file
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0200 going backup
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0200 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0200 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0200 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0200 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -323,15 +325,15 @@ describe('kvStoreBackupPromiseJsunittest', function () {
file
=
'
1
'
;
files
[
0
]
=
file
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0300 before backup
"
);
public
b
ackup
(
kvStore
,
file
)
;
public
B
ackup
(
kvStore
,
file
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0300 going backup
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0300 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0300 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0300 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0300 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -353,15 +355,15 @@ describe('kvStoreBackupPromiseJsunittest', function () {
file
=
'
1.0
'
;
files
[
0
]
=
file
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0400 before backup
"
);
public
b
ackup
(
kvStore
,
file
)
;
public
B
ackup
(
kvStore
,
file
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0400 going backup
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0400 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0400 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0400 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0400 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -382,7 +384,7 @@ describe('kvStoreBackupPromiseJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0500 before getname
"
);
file
=
''
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0500 before backup
"
);
await
publicb
ackup
(
kvStore
,
file
).
then
((
data
)
=>
{
publicB
ackup
(
kvStore
,
file
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0500 going backup
"
);
expect
(
true
).
assertEqual
(
data
==
"
code数字
"
);
done
();
...
...
@@ -419,19 +421,19 @@ describe('kvStoreBackupPromiseJsunittest', function () {
files
[
3
]
=
file3
;
files
[
4
]
=
file4
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0600 before backup
"
);
public
b
ackup
(
kvStore
,
file
);
public
B
ackup
(
kvStore
,
file
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file1
);
public
B
ackup
(
kvStore
,
file1
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file2
);
public
B
ackup
(
kvStore
,
file2
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file3
);
public
B
ackup
(
kvStore
,
file3
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file4
);
public
B
ackup
(
kvStore
,
file4
);
await
sleep
(
500
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0600 before public
d
eleteBackup
"
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0600 before public
D
eleteBackup
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
expect
(
"
1
"
).
assertEqual
(
delresult
[
0
][
0
])
expect
(
0
).
assertEqual
(
delresult
[
0
][
1
]);
...
...
@@ -448,7 +450,7 @@ describe('kvStoreBackupPromiseJsunittest', function () {
expect
(
"
5
"
).
assertEqual
(
delresult
[
4
][
0
])
expect
(
27459591
).
assertEqual
(
delresult
[
4
][
1
])
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0600 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0600 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -481,18 +483,18 @@ describe('kvStoreBackupPromiseJsunittest', function () {
files
[
4
]
=
file4
;
files
[
5
]
=
file5
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0700 before backup
"
);
public
b
ackup
(
kvStore
,
file
);
public
B
ackup
(
kvStore
,
file
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file1
);
public
B
ackup
(
kvStore
,
file1
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file2
);
public
B
ackup
(
kvStore
,
file2
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file3
);
public
B
ackup
(
kvStore
,
file3
);
await
sleep
(
500
);
public
b
ackup
(
kvStore
,
file4
);
public
B
ackup
(
kvStore
,
file4
);
await
sleep
(
500
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0700 before Sixth backup
"
);
await
publicb
ackup
(
kvStore
,
file5
).
then
((
data
)
=>
{
publicB
ackup
(
kvStore
,
file5
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0700 going backup
"
);
expect
(
true
).
assertEqual
(
data
==
"
code数字
"
);
done
();
...
...
@@ -503,8 +505,8 @@ describe('kvStoreBackupPromiseJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0700 Sixth backup err
"
);
})
await
sleep
(
1000
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0700 before public
d
eleteBackup
"
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0700 before public
D
eleteBackup
"
);
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
expect
(
"
1
"
).
assertEqual
(
delresult
[
0
][
0
])
console
.
log
(
delresult
[
0
][
0
]);
...
...
@@ -517,7 +519,7 @@ describe('kvStoreBackupPromiseJsunittest', function () {
expect
(
"
6
"
).
assertEqual
(
delresult
[
5
][
0
])
expect
(
27459591
).
assertEqual
(
delresult
[
5
][
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0700 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_MANALBACKUP_PROMISE_0700 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -537,18 +539,18 @@ describe('kvStoreBackupPromiseJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0100 before getname
"
);
file
=
'
legal
'
;
files
[
0
]
=
file
;
public
b
ackup
(
kvStore
,
file
);
public
B
ackup
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0100 before restoresp
"
);
await
sleep
(
1000
);
public
restores
p
(
kvStore
,
file
);
public
RestoreS
p
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0100 going restoresp
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
5
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0100 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0100 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0100 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0100 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -569,18 +571,18 @@ describe('kvStoreBackupPromiseJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0200 before getname
"
);
file
=
'
true
'
;
files
[
0
]
=
file
;
public
b
ackup
(
kvStore
,
file
);
public
B
ackup
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0200 before restoresp
"
);
await
sleep
(
1000
);
public
restores
p
(
kvStore
,
file
);
public
RestoreS
p
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0200 going restoresp
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
5
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0200 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0200 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0200 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0200 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -601,18 +603,18 @@ describe('kvStoreBackupPromiseJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0300 before getname
"
);
file
=
'
1
'
;
files
[
0
]
=
file
;
public
b
ackup
(
kvStore
,
file
);
public
B
ackup
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0300 before restoresp
"
);
await
sleep
(
1000
);
public
restores
p
(
kvStore
,
file
);
public
RestoreS
p
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0300 going restoresp
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0300 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0300 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0300 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0300 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -633,18 +635,18 @@ describe('kvStoreBackupPromiseJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0400 before getname
"
);
file
=
'
1.0
'
;
files
[
0
]
=
file
;
public
b
ackup
(
kvStore
,
file
);
public
B
ackup
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0400 before restoresp
"
);
await
sleep
(
1000
);
public
restores
p
(
kvStore
,
file
);
public
RestoreS
p
(
kvStore
,
file
);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0400 going restoresp
"
);
await
sleep
(
1000
);
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0400 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0400 delResult[1] =
"
+
delResult
[
1
]);
expect
(
0
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0400 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0400 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
}
catch
(
e
)
{
...
...
@@ -664,10 +666,10 @@ describe('kvStoreBackupPromiseJsunittest', function () {
try
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0500 before getname
"
);
file
=
''
;
public
b
ackup
(
kvStore
,
file
)
;
public
B
ackup
(
kvStore
,
file
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0500 before restoresp
"
);
await
sleep
(
1000
);
await
publicrestores
p
(
kvStore
,
file
).
then
((
data
)
=>
{
publicRestoreS
p
(
kvStore
,
file
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0500 going restoresp =
"
+
JSON
.
stringify
(
data
));
expect
(
true
).
assertEqual
(
false
);
done
();
...
...
@@ -694,7 +696,7 @@ describe('kvStoreBackupPromiseJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0600 before getname
"
);
file
=
'
legal
'
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0600 before restoresp
"
);
await
publicrestores
p
(
kvStore
,
file
).
then
((
data
)
=>
{
publicRestoreS
p
(
kvStore
,
file
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_RESTORESPECIFIEDVERSION_PROMISE_0600 going restoresp =
"
+
JSON
.
stringify
(
data
));
expect
(
true
).
assertEqual
(
false
);
done
();
...
...
@@ -723,12 +725,12 @@ describe('kvStoreBackupPromiseJsunittest', function () {
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_DELETEBACKUP_PROMISE_0100 before deleteBackup
"
);
file
=
'
123
'
;
files
[
0
]
=
file
;
await
publicd
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
publicD
eleteBackup
(
kvStore
,
files
).
then
((
data
)
=>
{
let
delResult
=
delresult
[
0
];
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_DELETEBACKUP_PROMISE_0100 delResult =
"
+
delResult
);
console
.
info
(
"
SUB_DDM_DKV_KVBACKUP_DELETEBACKUP_PROMISE_0100 delResult[1] =
"
+
delResult
[
1
]);
expect
(
27459591
).
assertEqual
(
delResult
[
1
]);
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_DELETEBACKUP_PROMISE_0100 public
d
eleteBackup
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_DELETEBACKUP_PROMISE_0100 public
D
eleteBackup
"
+
JSON
.
stringify
(
data
));
done
();
})
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_DELETEBACKUP_PROMISE_0100 going deleteBackup
"
);
...
...
@@ -748,7 +750,7 @@ describe('kvStoreBackupPromiseJsunittest', function () {
it
(
'
SUB_DDM_DKV_KVBACKUP_PUT_PROMISE_0100
'
,
0
,
async
function
(
done
)
{
try
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_PROMISE_0100 before putdata
"
);
public
p
ut
(
kvStore
,
"
key1
"
,
"
value1
"
)
;
public
P
ut
(
kvStore
,
"
key1
"
,
"
value1
"
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_PROMISE_0100 going putdata
"
);
done
();
}
catch
(
e
)
{
...
...
@@ -767,9 +769,9 @@ describe('kvStoreBackupPromiseJsunittest', function () {
it
(
'
SUB_DDM_DKV_KVBACKUP_PUT_PROMISE_0200
'
,
0
,
async
function
(
done
)
{
try
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_PROMISE_0200 before putdata
"
);
await
public
p
ut
(
kvStore
,
"
PutPromise0002
"
,
"
value
"
)
;
await
public
P
ut
(
kvStore
,
"
PutPromise0002
"
,
"
value
"
)
;
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_PROMISE_0200 going putdata
"
);
await
publicg
et
(
kvStore
,
"
PutPromise0002
"
).
then
((
data
)
=>
{
publicG
et
(
kvStore
,
"
PutPromise0002
"
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_PROMISE_0200 going getdata
"
+
JSON
.
stringify
(
data
));
expect
(
true
).
assertEqual
(
data
==
"
value
"
);
done
();
...
...
@@ -794,9 +796,9 @@ describe('kvStoreBackupPromiseJsunittest', function () {
it
(
'
SUB_DDM_DKV_KVBACKUP_PUT_PROMISE_0300
'
,
0
,
async
function
(
done
)
{
try
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_PROMISE_0300 before putdata
"
);
await
public
p
ut
(
kvStore
,
"
PutPromise0004
"
,
"
value1
"
)
;
await
public
P
ut
(
kvStore
,
"
PutPromise0004
"
,
"
value1
"
)
;
console
.
log
(
"
KvStoreBackupestDbBuckupPutPromiseTest004t going putdata
"
);
await
publicg
et
(
kvStore
,
"
PutPromise
"
).
then
((
data
)
=>
{
publicG
et
(
kvStore
,
"
PutPromise
"
).
then
((
data
)
=>
{
console
.
log
(
"
SUB_DDM_DKV_KVBACKUP_PUT_PROMISE_0300 going getdata
"
+
JSON
.
stringify
(
data
));
expect
(
true
).
assertEqual
(
JSON
.
stringify
(
data
)
==
'
{}
'
);
done
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录