diff --git a/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/src/main/js/test/ActsSubscriber_test_ordered.js b/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/src/main/js/test/ActsSubscriber_test_ordered.js index 5f969d4c6ceed8b47ac6a8c1d68be77f493f77cd..ffdd1180ec644f4be201fac3143d49173e983676 100644 --- a/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/src/main/js/test/ActsSubscriber_test_ordered.js +++ b/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/src/main/js/test/ActsSubscriber_test_ordered.js @@ -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(