未验证 提交 e4cd6866 编写于 作者: O openharmony_ci 提交者: Gitee

!5085 【XTS】【事件通知子系统】ActsSubscriberTestOrder 下 finishCommonEvent的callback形式_master

Merge pull request !5085 from zhijianwen/master
......@@ -477,9 +477,14 @@ describe('ActsSubscriberTestOrder', function () {
expect(data.event).assertEqual('publish_event0500');
expect(data.code).assertEqual(10);
expect(data.data).assertEqual('publish_event0500_init');
commonEventSubscriber0500.finishCommonEvent().then(() => {
console.info('===============>subscriberCallBack0500 finishCommonEvent promise');
});
commonEventSubscriber0500.finishCommonEvent((err) => {
if (err.code) {
console.info("===============>finishCommonEvent AsyncCallback failed " + JSON.stringify(err));
} else {
console.info("===============>FinishCommonEvent AsyncCallback success");
}
done()
})
}
async function subscriberCallBack0501(err, data) {
......@@ -489,10 +494,14 @@ describe('ActsSubscriberTestOrder', function () {
expect(data.event).assertEqual('publish_event0500');
expect(data.code).assertEqual(10);
expect(data.data).assertEqual('publish_event0500_init');
commonEventSubscriber0501.finishCommonEvent().then(() => {
console.info('===============>subscriberCallBack0501 finishCommonEvent promise');
done();
});
commonEventSubscriber0501.finishCommonEvent((err) => {
if (err.code) {
console.info("===============>finishCommonEvent AsyncCallback failed " + JSON.stringify(err));
} else {
console.info("===============>FinishCommonEvent AsyncCallback success");
}
done()
})
}
Subscriber.createSubscriber(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册