From 9372b70fee4070329fbad5f07136759d244c3693 Mon Sep 17 00:00:00 2001 From: yang-qibo Date: Wed, 28 Dec 2022 19:58:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E4=BE=8B=E7=A8=B3=E5=AE=9A=E6=80=A7?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yang-qibo --- .../src/main/js/test/RpcClientJsunit.test.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/communication/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js b/communication/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js index a8f2696b1..c91402bf1 100755 --- a/communication/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js +++ b/communication/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js @@ -4770,7 +4770,7 @@ export default function actsRpcClientJsTest() { done(); console.info("---------------------end SUB_Softbus_IPC_Compatibility_MessageSequence_13500---------------------------"); }); - + /* * @tc.number SUB_Softbus_IPC_Compatibility_MessageSequence_13600 * @tc.name Test fixed MessageSequence space size to pass rawData data @@ -4780,14 +4780,13 @@ export default function actsRpcClientJsTest() { it("SUB_Softbus_IPC_Compatibility_MessageSequence_13600", 0, async function(done){ console.info("---------------------start SUB_Softbus_IPC_Compatibility_MessageSequence_13600---------------------------"); try{ - let maxsize = 1024; let data = rpc.MessageSequence.create(); expect(data.getRawDataCapacity()).assertEqual(128*M); let rawdata = [1, 2, 3]; let option = new rpc.MessageOption(); let reply = rpc.MessageSequence.create(); - data.writeInt(maxsize); - data.writeRawData(rawdata, maxsize); + data.writeInt(rawdata.length); + data.writeRawData(rawdata, rawdata.length); expect(gIRemoteObject != undefined).assertTrue(); await gIRemoteObject.sendMessageRequest(CODE_WRITE_RAWDATA, data, reply, option).then((result) => { expect(result.errCode).assertEqual(0); @@ -4851,13 +4850,13 @@ export default function actsRpcClientJsTest() { let option = new rpc.MessageOption(); let reply = rpc.MessageSequence.create(); data.getRawDataCapacity(); - data.writeInt(K); - data.writeRawData(rawdata, K); + data.writeInt(rawdata.length); + data.writeRawData(rawdata, rawdata.length); expect(gIRemoteObject != undefined).assertTrue(); await gIRemoteObject.sendMessageRequest(CODE_WRITE_RAWDATA, data, reply, option).then((result) => { expect(result.errCode).assertEqual(0); - expect(result.reply.readInt()).assertEqual(K); - expect(result.reply.readRawData(K) != rawdata).assertTrue(); + expect(result.reply.readInt()).assertEqual(rawdata.length); + expect(result.reply.readRawData(rawdata.length) != rawdata).assertTrue(); }); data.reclaim(); reply.reclaim(); @@ -4866,7 +4865,7 @@ export default function actsRpcClientJsTest() { } done(); console.info("---------------------end SUB_Softbus_IPC_Compatibility_MessageSequence_13900---------------------------"); - }); + }); /* * @tc.number SUB_Softbus_IPC_Compatibility_MessageSequence_14000 -- GitLab