提交 b70fc2f4 编写于 作者: Z zhijianwen

finishCommonEvent

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