提交 2a7ad245 编写于 作者: Q qinliwen

<修改medialibrary xts>

Signed-off-by: Nqinliwen <qinliwen3@huawei.com>
上级 15f7cb84
...@@ -40,6 +40,9 @@ function checkAttrs(done, asset, tNum) { ...@@ -40,6 +40,9 @@ function checkAttrs(done, asset, tNum) {
done(); done();
} }
} }
function sleep(time){
for (let t = Date.now(); Date.now() - t <= time;);
}
describe('fileAssetCallBack2.test.js', async function () { describe('fileAssetCallBack2.test.js', async function () {
let fileKeyObj = mediaLibrary.FileKey; let fileKeyObj = mediaLibrary.FileKey;
...@@ -209,6 +212,7 @@ describe('fileAssetCallBack2.test.js', async function () { ...@@ -209,6 +212,7 @@ describe('fileAssetCallBack2.test.js', async function () {
asset.orientation = neworientation; asset.orientation = neworientation;
const id = asset.id; const id = asset.id;
asset.commitModify(async () => { asset.commitModify(async () => {
sleep(1000);
const fetchFileResult2 = await media.getFileAssets(imagesfetchOp); const fetchFileResult2 = await media.getFileAssets(imagesfetchOp);
const dataList = await fetchFileResult2.getAllObject(); const dataList = await fetchFileResult2.getAllObject();
let passed = false; let passed = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册