diff --git a/multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetCallBack2.test.js b/multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetCallBack2.test.js index 9f1f4db96ca23e941db5d217866647e9d4fb07b3..369d7a33475d80281053ff457c4202cd6a258126 100644 --- a/multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetCallBack2.test.js +++ b/multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetCallBack2.test.js @@ -40,6 +40,9 @@ function checkAttrs(done, asset, tNum) { done(); } } +function sleep(time){ + for (let t = Date.now(); Date.now() - t <= time;); +} describe('fileAssetCallBack2.test.js', async function () { let fileKeyObj = mediaLibrary.FileKey; @@ -209,6 +212,7 @@ describe('fileAssetCallBack2.test.js', async function () { asset.orientation = neworientation; const id = asset.id; asset.commitModify(async () => { + sleep(1000); const fetchFileResult2 = await media.getFileAssets(imagesfetchOp); const dataList = await fetchFileResult2.getAllObject(); let passed = false;