提交 5d5f713a 编写于 作者: L liangzhenyu123

用例执行时序优化

Signed-off-by: Nliangzhenyu123 <liangzhenyu6@huawei.com>
上级 f9b6d88c
...@@ -270,31 +270,32 @@ export default function rdbStoreBackupRestoreCallbackTest() { ...@@ -270,31 +270,32 @@ export default function rdbStoreBackupRestoreCallbackTest() {
}catch(err){ }catch(err){
expect(false).assertTrue(); expect(false).assertTrue();
} }
dataRdb.deleteRdbStore(context, DATABASE_BACKUP_NAME).then(() => {
try{
fileio.accessSync(DATABASE_DIR + DATABASE_BACKUP_NAME)
}catch(err){
console.info(TAG + 'error2 ' + err)
expect(true).assertTrue();
}
RdbStore.backup(DATABASE_BACKUP_NAME, (err, data) => {
if(err != null){
expect(false).assertTrue(0)
}else{
try{
console.info(TAG + 'Backup database success')
fileio.accessSync(DATABASE_DIR + DATABASE_BACKUP_NAME)
}catch(err){
expect(false).assertTrue();
}
}
done()
console.info(TAG + "************* RdbBackupRestoreCallbackTest_0500 end *************")
})
})
} }
}) })
await dataRdb.deleteRdbStore(context, DATABASE_BACKUP_NAME).then(() => {
try{
fileio.accessSync(DATABASE_DIR + DATABASE_BACKUP_NAME)
}catch(err){
console.info(TAG + 'error2 ' + err)
expect(true).assertTrue();
}
})
RdbStore.backup(DATABASE_BACKUP_NAME, (err, data) => {
if(err != null){
expect(false).assertTrue(0)
}else{
try{
console.info(TAG + 'Backup database success')
fileio.accessSync(DATABASE_DIR + DATABASE_BACKUP_NAME)
}catch(err){
expect(false).assertTrue();
}
}
})
done()
console.info(TAG + "************* RdbBackupRestoreCallbackTest_0500 end *************")
}) })
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册