diff --git a/multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAsset2.test.js b/multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAsset2.test.js index c3e0de030518ceff71367f8d36b77dc7ef48a4bb..b317c13750d6225d298264a03fa09007956a018c 100644 --- a/multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAsset2.test.js +++ b/multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAsset2.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('fileAsset2.test.js', async function () { let fileKeyObj = mediaLibrary.FileKey; @@ -207,7 +210,7 @@ describe('fileAsset2.test.js', async function () { asset.orientation = neworientation; const id = asset.id; await asset.commitModify(); - + sleep(1000); const fetchFileResult2 = await media.getFileAssets(imagesfetchOp); const dataList = await fetchFileResult2.getAllObject(); let passed = false; diff --git a/multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetPromise2.test.js b/multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetPromise2.test.js index 0671c14cdcab76d8915d751cc4c9faa4bf7ffefe..11be163fdd8049d58209568d909af779842a82df 100644 --- a/multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetPromise2.test.js +++ b/multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetPromise2.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('fileAssetPromise2.test.js', async function () { let fileKeyObj = mediaLibrary.FileKey; @@ -207,7 +210,7 @@ describe('fileAssetPromise2.test.js', async function () { asset.orientation = neworientation; const id = asset.id; await asset.commitModify(); - + sleep(1000); const fetchFileResult2 = await media.getFileAssets(imagesfetchOp); const dataList = await fetchFileResult2.getAllObject(); let passed = false;