Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e8816355
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
大约 1 年 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
e8816355
编写于
2月 14, 2023
作者:
O
openharmony_ci
提交者:
Gitee
2月 14, 2023
浏览文件
操作
浏览文件
下载
差异文件
!7504 修复用例
Merge pull request !7504 from 张攀/master
上级
74804799
8128034c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
122 deletion
+8
-122
communication/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js
...ion/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js
+8
-122
未找到文件。
communication/dsoftbus/rpc/src/main/js/test/RpcClientJsunit.test.js
100755 → 100644
浏览文件 @
e8816355
...
...
@@ -3807,23 +3807,12 @@ export default function actsRpcClientJsTest() {
it("SUB_Softbus_IPC_Compatibility_MessageSequence_10800", 0,async function(done){
console.info("---------------------start SUB_Softbus_IPC_Compatibility_MessageSequence_10800---------------------------");
try{
let count = 0;
function checkResult(num, str) {
expect(num).assertEqual(123);
expect(str).assertEqual("rpcListenerTest");
count++;
console.info("check result done, count: " + count);
if (count == 3) {
done();
};
};
let data = rpc.MessageSequence.create();
let reply = rpc.MessageSequence.create();
let option = new rpc.MessageOption();
data.writeInterfaceToken("rpcTestAbility");
let listeners = [new TestListener("rpcListener", checkResult),
new TestListener("rpcListener2", checkResult),
new TestListener("rpcListener3", checkResult)];
let listeners = [new TestRemoteObject("rpcListener"),
new TestRemoteObject("rpcListener2"),
new TestRemoteObject("rpcListener3")];
data.writeRemoteObjectArray(listeners);
expect(gIRemoteObject != undefined).assertTrue();
await gIRemoteObject.sendMessageRequest(CODE_WRITE_REMOTEOBJECTARRAY, data, reply, option).then((result) => {
...
...
@@ -3842,48 +3831,6 @@ export default function actsRpcClientJsTest() {
console.info("---------------------end SUB_Softbus_IPC_Compatibility_MessageSequence_10800---------------------------");
});
/*
* @tc.number SUB_Softbus_IPC_Compatibility_MessageSequence_10900
* @tc.name Call the writeremoteobjectarray interface to write the object array to the MessageSequence instance,
* and call readremoteobjectarray (objects: iremoteobject []) to read the data
* @tc.desc Function test
* @tc.level 3
*/
it("SUB_Softbus_IPC_Compatibility_MessageSequence_10900", 0,async function(done){
console.info("---------------------start SUB_Softbus_IPC_Compatibility_MessageSequence_10900---------------------------");
try{
let count = 0;
function checkResult(num, str) {
expect(num).assertEqual(123);
expect(str).assertEqual("rpcListenerTest");
count++;
console.info("check result done, count: " + count);
if (count == 3) {
done();
}
}
let data = rpc.MessageSequence.create();
let reply = rpc.MessageSequence.create();
let option = new rpc.MessageOption();
data.writeInterfaceToken("rpcTestAbility");
let listeners = [new TestListener("rpcListener", checkResult),
new TestListener("rpcListener2", checkResult),
new TestListener("rpcListener3", checkResult)];
data.writeRemoteObjectArray(listeners);
expect(gIRemoteObject != undefined).assertTrue();
await gIRemoteObject.sendMessageRequest(CODE_WRITE_REMOTEOBJECTARRAY, data, reply, option).then((result) => {
console.info("SUB_Softbus_IPC_Compatibility_MessageSequence_10900: sendMessageRequest is " + result.errCode);
expect(result.errCode == 0).assertTrue();
});
data.reclaim();
reply.reclaim();
} catch (error) {
expect(error == null).assertTrue();
}
done();
console.info("---------------------end SUB_Softbus_IPC_Compatibility_MessageSequence_10900---------------------------");
});
/*
* @tc.number SUB_Softbus_IPC_Compatibility_MessageSequence_11000
* @tc.name Test MessageSequence to deliver the reply message received in promise across processes
...
...
@@ -9350,7 +9297,7 @@ export default function actsRpcClientJsTest() {
console.info("---------------------end SUB_Softbus_IPC_Compatibility_MessageParcel_12100---------------------------");
});
/*
/*
* @tc.number SUB_Softbus_IPC_Compatibility_MessageParcel_12200
* @tc.name Call the writeremoteobjectarray interface to write the object array to the messageparcel
* instance, and call readremoteobjectarray to read the data
...
...
@@ -9360,25 +9307,13 @@ export default function actsRpcClientJsTest() {
it("SUB_Softbus_IPC_Compatibility_MessageParcel_12200", 0,async function(done){
console.info("---------------------start SUB_Softbus_IPC_Compatibility_MessageParcel_12200---------------------------");
try{
let count = 0
function checkResult(num, str) {
expect(num).assertEqual(123);
expect(str).assertEqual("rpcListenerTest");
count++;
console.info("check result done, count: " + count);
if (count == 3) {
done();
}
}
var data = rpc.MessageParcel.create();
console.info("SUB_Softbus_IPC_Compatibility_MessageParcel_12200: create object successfully.");
var reply = rpc.MessageParcel.create();
var option = new rpc.MessageOption();
expect(data.writeInterfaceToken("rpcTestAbility")).assertTrue();
var listeners = [new TestListener("rpcListener", checkResult),
new TestListener("rpcListener2", checkResult),
new TestListener("rpcListener3", checkResult)];
var listeners = [new TestRemoteObject("rpcListener"),
new TestRemoteObject("rpcListener2"),
new TestRemoteObject("rpcListener3")];
var result = data.writeRemoteObjectArray(listeners);
console.info("SUB_Softbus_IPC_Compatibility_MessageParcel_12200: writeRemoteObjectArray is " + result);
expect(result == true).assertTrue();
...
...
@@ -9404,56 +9339,7 @@ export default function actsRpcClientJsTest() {
console.info("---------------------end SUB_Softbus_IPC_Compatibility_MessageParcel_12200---------------------------");
});
/*
* @tc.number SUB_Softbus_IPC_Compatibility_MessageParcel_12300
* @tc.name Call the writeremoteobjectarray interface to write the object array to the messageparcel instance,
* and call readremoteobjectarray (objects: iremoteobject []) to read the data
* @tc.desc Function test
* @tc.level 3
*/
it("SUB_Softbus_IPC_Compatibility_MessageParcel_12300", 0,async function(done){
console.info("---------------------start SUB_Softbus_IPC_Compatibility_MessageParcel_12300---------------------------");
try{
let count = 0;
function checkResult(num, str) {
expect(num).assertEqual(123);
expect(str).assertEqual("rpcListenerTest");
count++;
console.info("check result done, count: " + count);
if (count == 3) {
done();
}
}
var data = rpc.MessageParcel.create();
console.info("SUB_Softbus_IPC_Compatibility_MessageParcel_12300: create object successfully.");
var reply = rpc.MessageParcel.create();
var option = new rpc.MessageOption();
expect(data.writeInterfaceToken("rpcTestAbility")).assertTrue()
var listeners = [new TestListener("rpcListener", checkResult),
new TestListener("rpcListener2", checkResult),
new TestListener("rpcListener3", checkResult)];
var result = data.writeRemoteObjectArray(listeners);
console.info("RpcClient: writeRemoteObjectArray is " + result);
expect(result == true).assertTrue();
if (gIRemoteObject == undefined)
{
console.info("SUB_Softbus_IPC_Compatibility_MessageParcel_12300: gIRemoteObject is undefined");
}
await gIRemoteObject.sendRequest(CODE_WRITE_REMOTEOBJECTARRAY, data, reply, option).then((result) => {
console.info("SUB_Softbus_IPC_Compatibility_MessageParcel_12300: sendRequestis is " + result.errCode);
expect(result.errCode == 0).assertTrue();
});
data.reclaim();
reply.reclaim();
done();
} catch (error) {
console.info("SUB_Softbus_IPC_Compatibility_MessageParcel_12300:error = " + error);
}
console.info("---------------------end SUB_Softbus_IPC_Compatibility_MessageParcel_12300---------------------------");
});
/*
/*
* @tc.number SUB_Softbus_IPC_Compatibility_MessageParcel_12400
* @tc.name Test messageparcel delivery file descriptor object
* @tc.desc Function test
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录