diff --git a/notification/ces_standard/actsCommonEventSystemAPITest/entry/src/main/ets/test/ActsCommonEventSystemAPITest.test.ets b/notification/ces_standard/actsCommonEventSystemAPITest/entry/src/main/ets/test/ActsCommonEventSystemAPITest.test.ets index 42c310153b7267df7ea4da9e69f1650f19b8f890..b733fcc547b417d52db2918178bf19ba3c1a7d2a 100644 --- a/notification/ces_standard/actsCommonEventSystemAPITest/entry/src/main/ets/test/ActsCommonEventSystemAPITest.test.ets +++ b/notification/ces_standard/actsCommonEventSystemAPITest/entry/src/main/ets/test/ActsCommonEventSystemAPITest.test.ets @@ -79,13 +79,15 @@ describe('SUB_NOTIFICATION_CES_SYSTEM_API_TEST', function () { it('SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0300', 0, async function (done) { console.info(`${TAG} SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0300 START`); - commonEventManager.removeStickyCommonEvent("sticky_event", (error) => { - if (error) { + commonEventManager.removeStickyCommonEvent("sticky_event", (err) => { + if (err) { console.info(`${TAG} remove sticky event AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) expect(err.code).assertEqual(202); + done() } else { console.info("${TAG} remove sticky event AsyncCallback success"); expect(false).assertTrue() + done() } }); @@ -103,9 +105,11 @@ describe('SUB_NOTIFICATION_CES_SYSTEM_API_TEST', function () { commonEventManager.removeStickyCommonEvent("sticky_event").then(() => { console.info("${TAG} remove sticky event AsyncCallback success"); expect(false).assertTrue() + done() }).catch ((err) => { console.info(`${TAG} remove sticky event AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) expect(err.code).assertEqual(202); + done() }); console.info(`${TAG} SUB_NOTIFICATION_CES_SYSTEM_API_TEST_0400 END`);