From bba75227bd1a460cd18aa5b1fcedbc0e366b769f Mon Sep 17 00:00:00 2001 From: zhang-daiyue Date: Sun, 29 Jan 2023 12:03:19 +0000 Subject: [PATCH] Remove read operation on write-file-handle Signed-off-by: zhang-daiyue Change-Id: I3ae8e72df1fb0fe12dc12f2f8307b1f7bb2ea144 --- .../entry/src/main/ets/test/fileAssetTestCallback.test.ets | 7 ------- .../entry/src/main/ets/test/fileAssetTestPromise.test.ets | 7 ------- 2 files changed, 14 deletions(-) diff --git a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestCallback.test.ets b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestCallback.test.ets index 2684596fa..ea9322500 100644 --- a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestCallback.test.ets +++ b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestCallback.test.ets @@ -160,13 +160,6 @@ export default function fileAssetTestCallbackTest(abilityContext) { let write = await fileio.write(fd, buf); console.info(`${testNum} :: write: ${write}`); expect(write).assertEqual(assetProps.write); - let buf1 = new ArrayBuffer(4096); - try { - await fileio.read(fd, buf1); - expect().assertFail(); - } catch (error) { - expect(true).assertTrue(); - } fetchFileResult.close(); done(); }); diff --git a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestPromise.test.ets b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestPromise.test.ets index e3f50b8b5..598ca5f69 100644 --- a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestPromise.test.ets @@ -137,13 +137,6 @@ export default function fileAssetTestPromiseTest(abilityContext) { let write = await fileio.write(fd, buf); console.info(`${testNum} :: write: ${write}`); expect(write).assertEqual(assetProps.write); - let buf1 = new ArrayBuffer(4096); - try { - await fileio.read(fd, buf1); - expect().assertFail(); - } catch (error) { - expect(true).assertTrue(); - } fetchFileResult.close(); done(); } catch (error) { -- GitLab