Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
64004f9d
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看板
未验证
提交
64004f9d
编写于
11月 07, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 07, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6372 【Distributeddatamgr】【monthly_20221018】用例优化
Merge pull request !6372 from 梁梁/monthly_20221018
上级
fc297464
7e129ab5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
88 addition
and
29 deletion
+88
-29
distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/SingleKvStoreKVCallbackJsTest.js
...est/hap/src/main/js/test/SingleKvStoreKVCallbackJsTest.js
+16
-6
distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/SingleKvStoreKVPromiseJsTest.js
...test/hap/src/main/js/test/SingleKvStoreKVPromiseJsTest.js
+18
-8
distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStoreCallbackJsunit.test.js
.../hap/src/main/js/test/SingleKvStoreCallbackJsunit.test.js
+16
-7
distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStorePromiseJsunit.test.js
...t/hap/src/main/js/test/SingleKvStorePromiseJsunit.test.js
+5
-5
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbStoreDistributedJsunit.test.js
...st/hap/src/main/js/test/RdbStoreDistributedJsunit.test.js
+31
-1
distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/RdbstoreDistributedEtsunit.test.ets
...try/src/main/ets/test/RdbstoreDistributedEtsunit.test.ets
+2
-2
未找到文件。
distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/SingleKvStoreKVCallbackJsTest.js
浏览文件 @
64004f9d
...
@@ -2337,14 +2337,24 @@ describe('SingleKvStoreCallbackTest', function () {
...
@@ -2337,14 +2337,24 @@ describe('SingleKvStoreCallbackTest', function () {
*/
*/
it
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULT_CALLBACK_8200
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULT_CALLBACK_8200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
SingleKvStoreCloseResultSetCallbackTest004
'
);
console
.
info
(
'
SingleKvStoreCloseResultSetCallbackTest004
'
);
try
{
let
resultSet
=
null
;
console
.
info
(
'
SingleKvStoreCloseResultSetCallbackTest004 success
'
);
await
kvStore
.
getResultSet
(
'
batch_test_string_key
'
).
then
((
result
)
=>
{
}
catch
(
e
)
{
console
.
info
(
'
SingleKvStoreCloseResultSetCallbackTest004 getResultSet success
'
);
console
.
error
(
'
SingleKvStoreCloseResultSetCallbackTest004 e
'
+
`, error code is
${
e
.
code
}
, message is
${
e
.
message
}
`
);
resultSet
=
result
;
expect
(
null
).
assertFail
();
})
try
{
kvStore
.
closeResultSet
(
""
,(
err
,
data
)
=>
{
console
.
info
(
'
SingleKvStoreCloseResultSetCallbackTest004 close result finish
'
)
expect
(
null
).
assertFail
();
})
}
catch
(
err
){
expect
(
err
.
code
).
assertEqual
(
"
401
"
)
}
}
done
();
done
();
})
});
/**
/**
* @tc.number SUB_DDM_DKV_SINGLEKVSTORE_GETENTRIES_CALLBACK_8300
* @tc.number SUB_DDM_DKV_SINGLEKVSTORE_GETENTRIES_CALLBACK_8300
...
...
distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/SingleKvStoreKVPromiseJsTest.js
浏览文件 @
64004f9d
...
@@ -2661,7 +2661,7 @@ describe('SingleKvStorePromiseTest', function () {
...
@@ -2661,7 +2661,7 @@ describe('SingleKvStorePromiseTest', function () {
console
.
info
(
'
SUB_DDM_DKV_SINGLEKVSTORE_GETSECURITYLEVEL_PROMISE_0500 putBatch success
'
);
console
.
info
(
'
SUB_DDM_DKV_SINGLEKVSTORE_GETSECURITYLEVEL_PROMISE_0500 putBatch success
'
);
expect
(
err
==
undefined
).
assertTrue
();
expect
(
err
==
undefined
).
assertTrue
();
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
error
(
'
SUB_DDM_DKV_SINGLEKVSTORE_
SETSYNCRANGE_PROMISE_01
00 putBatch fail
'
+
`, error code is
${
err
.
code
}
, message is
${
err
.
message
}
`
);
console
.
error
(
'
SUB_DDM_DKV_SINGLEKVSTORE_
GETSECURITYLEVEL_PROMISE_05
00 putBatch fail
'
+
`, error code is
${
err
.
code
}
, message is
${
err
.
message
}
`
);
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
});
});
var
query
=
new
factory
.
Query
();
var
query
=
new
factory
.
Query
();
...
@@ -2714,7 +2714,7 @@ describe('SingleKvStorePromiseTest', function () {
...
@@ -2714,7 +2714,7 @@ describe('SingleKvStorePromiseTest', function () {
console
.
info
(
'
SUB_DDM_DKV_SINGLEKVSTORE_GETSECURITYLEVEL_PROMISE_0600 putBatch success
'
);
console
.
info
(
'
SUB_DDM_DKV_SINGLEKVSTORE_GETSECURITYLEVEL_PROMISE_0600 putBatch success
'
);
expect
(
err
==
undefined
).
assertTrue
();
expect
(
err
==
undefined
).
assertTrue
();
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
error
(
'
SUB_DDM_DKV_SINGLEKVSTORE_
SETSYNCRANGE_PROMISE_01
00 putBatch fail
'
+
`, error code is
${
err
.
code
}
, message is
${
err
.
message
}
`
);
console
.
error
(
'
SUB_DDM_DKV_SINGLEKVSTORE_
GETSECURITYLEVEL_PROMISE_06
00 putBatch fail
'
+
`, error code is
${
err
.
code
}
, message is
${
err
.
message
}
`
);
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
});
});
var
query
=
new
factory
.
Query
();
var
query
=
new
factory
.
Query
();
...
@@ -2850,8 +2850,7 @@ describe('SingleKvStorePromiseTest', function () {
...
@@ -2850,8 +2850,7 @@ describe('SingleKvStorePromiseTest', function () {
it
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0200
'
);
console
.
info
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0200
'
);
try
{
try
{
console
.
info
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0200 success
'
);
let
resultSet
=
undefined
;
let
resultSet
=
null
;
await
kvStore
.
getResultSet
(
'
batch_test_string_key
'
).
then
((
result
)
=>
{
await
kvStore
.
getResultSet
(
'
batch_test_string_key
'
).
then
((
result
)
=>
{
console
.
info
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0200 getResultSet success
'
);
console
.
info
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0200 getResultSet success
'
);
resultSet
=
result
;
resultSet
=
result
;
...
@@ -2904,13 +2903,24 @@ describe('SingleKvStorePromiseTest', function () {
...
@@ -2904,13 +2903,24 @@ describe('SingleKvStorePromiseTest', function () {
* @tc.name Test Js Api SingleKvStoreCloseResultSet testcase 004
* @tc.name Test Js Api SingleKvStoreCloseResultSet testcase 004
*/
*/
it
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0400
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0400
'
);
let
resultSet
=
undefined
;
let
errorInfo
=
undefined
;
await
kvStore
.
getResultSet
(
'
batch_test_string_key
'
).
then
((
result
)
=>
{
console
.
info
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0400 getResultSet success
'
);
resultSet
=
result
;
}).
catch
((
err
)
=>
{
console
.
error
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0400 getResultSet fail
'
+
`, error code is
${
err
.
code
}
, message is
${
err
.
message
}
`
);
expect
(
null
).
assertFail
();
});
try
{
try
{
kvStore
.
closeResultSet
(
""
)
console
.
info
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0400 success
'
);
console
.
info
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0400 success
'
);
}
catch
(
e
)
{
}
catch
(
e
rr
)
{
console
.
error
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0400 e
'
+
`, error code is
${
e
.
code
}
, message is
${
e
.
message
}
`
);
console
.
error
(
'
SUB_DDM_DKV_SINGLEKVSTORE_CLOSERESULTSET_PROMISE_0400 e
'
+
`, error code is
${
e
rr
.
code
}
, message is
${
err
.
message
}
`
);
e
xpect
(
null
).
assertFail
();
e
rrorInfo
=
err
}
}
expect
(
errorInfo
.
code
).
assertEqual
(
"
401
"
);
done
();
done
();
})
})
...
...
distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStoreCallbackJsunit.test.js
浏览文件 @
64004f9d
...
@@ -2262,13 +2262,22 @@ describe('singleKvStoreCallbackTest', function () {
...
@@ -2262,13 +2262,22 @@ describe('singleKvStoreCallbackTest', function () {
* @tc.desc Test Js Api SingleKvStore.CloseResultSet() testcase 104
* @tc.desc Test Js Api SingleKvStore.CloseResultSet() testcase 104
*/
*/
it
(
'
testSingleKvStoreCloseResultSet104
'
,
0
,
async
function
(
done
)
{
it
(
'
testSingleKvStoreCloseResultSet104
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testSingleKvStoreCloseResultSet104
'
);
console
.
info
(
'
SingleKvStoreCloseResultSetCallbackTest004
'
);
try
{
let
resultSet
=
null
;
console
.
info
(
'
testSingleKvStoreCloseResultSet104 success
'
);
await
kvStore
.
getResultSet
(
'
batch_test_string_key
'
).
then
((
result
)
=>
{
}
catch
(
e
)
{
console
.
info
(
'
SingleKvStoreCloseResultSetCallbackTest004 getResultSet success
'
);
console
.
info
(
'
testSingleKvStoreCloseResultSet104 e
'
+
e
);
resultSet
=
result
;
expect
(
null
).
assertFail
();
})
}
kvStore
.
closeResultSet
(
""
,(
err
,
data
)
=>
{
if
(
err
!=
undefined
){
console
.
info
(
`SingleKvStoreCloseResultSetCallbackTest004 close result error, error is
${
err
}
`
)
}
else
{
expect
(
null
).
assertFail
();
}
done
();
})
await
sleep
(
1000
)
done
();
done
();
})
})
...
...
distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/SingleKvStorePromiseJsunit.test.js
浏览文件 @
64004f9d
...
@@ -2470,12 +2470,12 @@ describe('singleKvStorePromiseTest', function () {
...
@@ -2470,12 +2470,12 @@ describe('singleKvStorePromiseTest', function () {
*/
*/
it
(
'
testSingleKvStoreCloseResultSet004
'
,
0
,
async
function
(
done
)
{
it
(
'
testSingleKvStoreCloseResultSet004
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
testSingleKvStoreCloseResultSet004
'
);
console
.
info
(
'
testSingleKvStoreCloseResultSet004
'
);
try
{
await
kvStore
.
closeResultSet
(
""
).
then
((
data
)
=>
{
console
.
info
(
'
testSingleKvStoreCloseResultSet004 success
'
);
console
.
info
(
"
testSingleKvStoreCloseResultSet004 close resultSet success
"
)
}
catch
(
e
)
{
console
.
info
(
'
testSingleKvStoreCloseResultSet004 e
'
+
e
);
expect
(
null
).
assertFail
();
expect
(
null
).
assertFail
();
}
}).
catch
((
err
)
=>
{
console
.
info
(
`testSingleKvStoreCloseResultSet004 close resultSet error, error is
${
err
}
`
)
})
done
();
done
();
})
})
...
...
distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RdbStoreDistributedJsunit.test.js
浏览文件 @
64004f9d
...
@@ -15,7 +15,9 @@
...
@@ -15,7 +15,9 @@
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
import
dataRdb
from
'
@ohos.data.rdb
'
;
import
dataRdb
from
'
@ohos.data.rdb
'
;
import
abilityFeatureAbility
from
'
@ohos.ability.featureAbility
'
;
let
context
=
abilityFeatureAbility
.
getContext
();
const
TAG
=
"
[RDB_JSKITS_TEST_Distributed]
"
const
TAG
=
"
[RDB_JSKITS_TEST_Distributed]
"
const
STORE_NAME
=
"
distributed_rdb.db
"
const
STORE_NAME
=
"
distributed_rdb.db
"
var
rdbStore
=
undefined
;
var
rdbStore
=
undefined
;
...
@@ -310,6 +312,34 @@ describe('rdbStoreDistributedTest', function () {
...
@@ -310,6 +312,34 @@ describe('rdbStoreDistributedTest', function () {
done
();
done
();
console
.
info
(
TAG
+
"
************* testRdbStoreDistributed0011 end *************
"
);
console
.
info
(
TAG
+
"
************* testRdbStoreDistributed0011 end *************
"
);
})
})
/**
* @tc.name sync test
* @tc.number SUB_DDM_AppDataFWK_JSRDB_Distributed_syncV9_0100
* @tc.desc sync test
*/
it
(
'
SUB_DDM_AppDataFWK_JSRDB_Distributed_syncV9_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
"
************* SUB_DDM_AppDataFWK_JSRDB_Distributed_syncV9_0100 start *************
"
);
let
config
=
{
name
:
"
secure.db
"
,
securityLevel
:
dataRdb
.
SecurityLevel
.
S1
}
await
dataRdb
.
getRdbStoreV9
(
context
,
config
,
1
).
then
(
async
(
store
)
=>
{
let
predicates
=
new
dataRdb
.
RdbPredicatesV9
(
"
employee
"
)
predicates
=
predicates
.
inDevices
(
"
12345678abcd
"
);
try
{
store
.
sync
(
dataRdb
.
SyncMode
.
SYNC_MODE_PUSH
,
predicates
);
}
catch
(
err
)
{
expect
(
null
).
assertFail
();
}
}).
catch
((
err
)
=>
{
expect
(
null
).
assertFail
();
})
await
dataRdb
.
deleteRdbStore
(
context
,
"
secure.db
"
);
done
();
console
.
info
(
TAG
+
"
************* SUB_DDM_AppDataFWK_JSRDB_Distributed_syncV9_0100 end *************
"
);
})
/**
/**
* @tc.name sync Callback test
* @tc.name sync Callback test
...
@@ -369,7 +399,7 @@ describe('rdbStoreDistributedTest', function () {
...
@@ -369,7 +399,7 @@ describe('rdbStoreDistributedTest', function () {
console
.
info
(
TAG
+
"
************* testRdbStoreDistributed0013 end *************
"
);
console
.
info
(
TAG
+
"
************* testRdbStoreDistributed0013 end *************
"
);
})
})
/**
/**
* @tc.name obtainDistributedTableName Callback interface test
* @tc.name obtainDistributedTableName Callback interface test
* @tc.number SUB_DDM_AppDataFWK_JSRDB_Distributed_014
* @tc.number SUB_DDM_AppDataFWK_JSRDB_Distributed_014
* @tc.desc obtainDistributedTableName test
* @tc.desc obtainDistributedTableName test
...
...
distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/RdbstoreDistributedEtsunit.test.ets
浏览文件 @
64004f9d
...
@@ -34,13 +34,13 @@ describe('rdbStoreDistributedTest', function () {
...
@@ -34,13 +34,13 @@ describe('rdbStoreDistributedTest', function () {
})
})
beforeEach(async function () {
beforeEach(async function () {
rdbStore = await dataRdb.getRdbStore(context, config, 1);
rdbStore = await dataRdb.getRdbStore
V9
(context, config, 1);
await rdbStore.executeSql(CREATE_TABLE_TEST, null)
await rdbStore.executeSql(CREATE_TABLE_TEST, null)
console.info(TAG + 'beforeEach')
console.info(TAG + 'beforeEach')
})
})
afterEach(async function () {
afterEach(async function () {
await dataRdb.deleteRdbStore(context, STORE_NAME);
await dataRdb.deleteRdbStore
V9
(context, STORE_NAME);
console.info(TAG + 'afterEach')
console.info(TAG + 'afterEach')
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录