diff --git a/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/test/ActsSubscriber_test_ordered.js b/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/test/ActsSubscriber_test_ordered.js index 6b867e091f7b7dd02c5da3f6d6edb2fb4129c3b2..b8799a0a76bb19413a1f2469bcdb989129d47980 100644 --- a/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/test/ActsSubscriber_test_ordered.js +++ b/notification/ces_standard/subscribeandpublish/actssubscriberorderedtest/entry/src/main/js/test/ActsSubscriber_test_ordered.js @@ -383,7 +383,7 @@ describe('ActsSubscriberTestOrder', function () { * @tc.number : ActsSubscriberTestOrder_0400 * @tc.name : verify subscribe and publish : Check subscribe same events * and publish common ordered events and check abort event - * @tc.desc : Check the subscriber can receive event "publish_eventOrder0400" type of the interface (by promise) + * @tc.desc : Check the subscriber can receive event "publish_eventOrder0400" type of the interface by promise */ it ('ActsSubscriberTestOrder_0400', 0, async function (done) { console.info("===============ActsSubscriberTestOrder_0400===============>"); diff --git a/notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/test/ActsSubscriber_test_unorder.js b/notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/test/ActsSubscriber_test_unorder.js index e66a8c0b9945941b8f3340a86ef231c95ccc9737..86b378be98fc4c5c8e1d2696d162b24c1f357a81 100755 --- a/notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/test/ActsSubscriber_test_unorder.js +++ b/notification/ces_standard/subscribeandpublish/actssubscriberunordersystemtest/entry/src/main/js/test/ActsSubscriber_test_unorder.js @@ -210,7 +210,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) { Subscriber.subscribe(commonEventSubscriber1, subscriberCallBack001); for (let i = 0; i < 50; ++i) { setTimeout(function (){ - console.debug("===============>ActsSubscriberTestUnorderSystem_0100 delay 1s==================i :" +i); + console.debug("===============>ActsSubscriberTestUnorderSystem_0100 delay 1s=========i:"+i); Subscriber.publish(commonEventSubscribeInfo.events[i], publishCallback); }, 1000); } @@ -287,7 +287,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) { Subscriber.subscribe(commonEventSubscriber2, subscriberCallBack002); for (let i = 0; i < 36; ++i) { setTimeout(function (){ - console.debug("===============>ActsSubscriberTestUnorderSystem_0200 delay 1s==================i :"+i); + console.debug("===============>ActsSubscriberTestUnorderSystem_0200 delay 1s===========i:"+i); Subscriber.publish(commonEventSubscribeInfo.events[i], publishCallback); }, 1000); } diff --git a/notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/test/ActsSubscriber_test_unorder.js b/notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/test/ActsSubscriber_test_unorder.js index 974cb4b9b838731b773840ef3a5e5c53e5eb36da..b6b81739d2161161547186b11821704d21ae2804 100755 --- a/notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/test/ActsSubscriber_test_unorder.js +++ b/notification/ces_standard/subscribeandpublish/actssubscriberunordertest/entry/src/main/js/test/ActsSubscriber_test_unorder.js @@ -350,8 +350,7 @@ describe('ActsSubscriberTestUnorder', async function (done) { function sleep(delay) { var start = (new Date()).getTime(); - while((new Date()).getTime() - start < delay) { - continue; + while ((new Date()).getTime() - start < delay) { } done(); } @@ -430,7 +429,7 @@ describe('ActsSubscriberTestUnorder', async function (done) { expect(data.data).assertEqual("publish_event1000_data"); if (num == 0) { num++; - }else if (num == 1) { + } else if (num == 1) { done(); } } @@ -445,14 +444,12 @@ describe('ActsSubscriberTestUnorder', async function (done) { expect(data.data).assertEqual("publish_event1000_data"); if (num == 0) { num++; - }else if (num == 1) { + } else if (num == 1) { done(); } } - Subscriber.createSubscriber( - commonEventSubscribeInfo1 - ).then((data)=>{ + Subscriber.createSubscriber(commonEventSubscribeInfo1).then((data)=>{ console.info("=================ActsSubscriberTestUnorder_1000=========>createSubscriber Promise1000_1"); commonEventSubscriber0101 = data; data.getSubscribeInfo().then(()=>{ @@ -461,9 +458,7 @@ describe('ActsSubscriberTestUnorder', async function (done) { }); }); - Subscriber.createSubscriber( - commonEventSubscribeInfo2 - ).then((data)=>{ + Subscriber.createSubscriber(commonEventSubscribeInfo2).then((data)=>{ console.info("=================ActsSubscriberTestUnorder_1000=========>createSubscriber Promise1000_2"); commonEventSubscriber0102 = data; data.getSubscribeInfo().then(()=>{