提交 eaca382d 编写于 作者: Y yanglifeng1217

<modified>

Signed-off-by: Nyanglifeng1217 <yanglifeng5@huawei.com>
上级 f76ac270
......@@ -665,7 +665,7 @@ describe('rdbstoreInsertTest', function () {
const valueBuckets = [valueBucket1, valueBucket2, valueBucket3]
await rdbStore.executeSql(CREATE_TABLE_NAME + "callback1" + CREATE_TABLE).then(() => {
console.info(TAG + "Batch insert data start")
rdbStore.batchInsert("testcallback1", valueBuckets, async (err, data) => {
await rdbStore.batchInsert("testcallback1", valueBuckets, async (err, data) => {
if(err != null){
expect(false).assertTrue();
}else{
......@@ -1068,7 +1068,6 @@ describe('rdbstoreInsertTest', function () {
*/
it('testRdbStorebatchInsertCallback0007', 0, async function (done) {
console.info(TAG + "************* testRdbStorebatchInsertCallback0007 start *************");
try{
await rdbStore.executeSql(CREATE_TABLE_NAME + "Callback7" + CREATE_TABLE).then(async () => {
await rdbStore.batchInsert("testCallback7", (err,data) => {
console.info(TAG + "Affect row is " + data)
......@@ -1084,10 +1083,6 @@ describe('rdbstoreInsertTest', function () {
}).catch((err) => {
expect(null).assertFail();
})
}catch(err){
console.info(TAG + "Batch insert data error: " + err)
expect(null).assertFail();
}
done()
console.info(TAG + "************* testRdbStorebatchInsertCallback0007 end *************");
})
......
......@@ -80,9 +80,9 @@ describe('rdbStoreUpdateTest', function () {
"blobType": u8,
}
let predicates = await new dataRdb.RdbPredicates("test")
await predicates.equalTo("id", "1")
predicates.equalTo("id", "1")
let updatePromise = rdbStore.update(valueBucket, predicates)
updatePromise.then(async (ret) => {
await updatePromise.then(async (ret) => {
await expect(1).assertEqual(ret);
await console.info(TAG + "update done: " + ret);
let resultSet = await rdbStore.query(predicates)
......@@ -94,15 +94,15 @@ describe('rdbStoreUpdateTest', function () {
const salary = await resultSet.getDouble(resultSet.getColumnIndex("salary"))
const blobType = await resultSet.getBlob(resultSet.getColumnIndex("blobType"))
await expect(1).assertEqual(id);
await expect("lisi").assertEqual(name);
await expect(20).assertEqual(age);
await expect(200.5).assertEqual(salary);
await expect(4).assertEqual(blobType[0]);
await expect(5).assertEqual(blobType[1]);
await expect(6).assertEqual(blobType[2]);
expect(1).assertEqual(id);
expect("lisi").assertEqual(name);
expect(20).assertEqual(age);
expect(200.5).assertEqual(salary);
expect(4).assertEqual(blobType[0]);
expect(5).assertEqual(blobType[1]);
expect(6).assertEqual(blobType[2]);
console.info(TAG + "{id=" + id + ", name=" + name + ", age=" + age + ", salary=" + salary + ", blobType=" + blobType);
await expect(false).assertEqual(resultSet.goToNextRow())
expect(false).assertEqual(resultSet.goToNextRow())
resultSet = null
}).catch((err) => {
console.info(TAG + "update error");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册