From 2a7ad2450e82727119b358b750ac241b6f3567b7 Mon Sep 17 00:00:00 2001 From: qinliwen <qinliwen3@huawei.com> Date: Sat, 6 Aug 2022 15:10:47 +0800 Subject: [PATCH] =?UTF-8?q?<=E4=BF=AE=E6=94=B9medialibrary=20xts>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: qinliwen <qinliwen3@huawei.com> --- .../src/main/js/test/fileAssetCallBack2.test.js | 4 ++++ 1 file changed, 4 insertions(+) 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 9f1f4db96..369d7a334 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; -- GitLab