提交 8053e27a 编写于 作者: K kirl.liu

Fix codex

Signed-off-by: Nkirl.liu <kirl.liu@huawei.com>
上级 497ef178
...@@ -383,7 +383,7 @@ describe('ActsSubscriberTestOrder', function () { ...@@ -383,7 +383,7 @@ describe('ActsSubscriberTestOrder', function () {
* @tc.number : ActsSubscriberTestOrder_0400 * @tc.number : ActsSubscriberTestOrder_0400
* @tc.name : verify subscribe and publish : Check subscribe same events * @tc.name : verify subscribe and publish : Check subscribe same events
* and publish common ordered events and check abort event * 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) { it ('ActsSubscriberTestOrder_0400', 0, async function (done) {
console.info("===============ActsSubscriberTestOrder_0400===============>"); console.info("===============ActsSubscriberTestOrder_0400===============>");
......
...@@ -210,7 +210,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) { ...@@ -210,7 +210,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
Subscriber.subscribe(commonEventSubscriber1, subscriberCallBack001); Subscriber.subscribe(commonEventSubscriber1, subscriberCallBack001);
for (let i = 0; i < 50; ++i) { for (let i = 0; i < 50; ++i) {
setTimeout(function (){ setTimeout(function (){
console.debug("===============>ActsSubscriberTestUnorderSystem_0100 delay 1s==================i :" +i); console.debug("===============>ActsSubscriberTestUnorderSystem_0100 delay 1s=========i:"+i);
Subscriber.publish(commonEventSubscribeInfo.events[i], publishCallback); Subscriber.publish(commonEventSubscribeInfo.events[i], publishCallback);
}, 1000); }, 1000);
} }
...@@ -287,7 +287,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) { ...@@ -287,7 +287,7 @@ describe('ActsSubscriberTestUnorderSystem', async function (done) {
Subscriber.subscribe(commonEventSubscriber2, subscriberCallBack002); Subscriber.subscribe(commonEventSubscriber2, subscriberCallBack002);
for (let i = 0; i < 36; ++i) { for (let i = 0; i < 36; ++i) {
setTimeout(function (){ setTimeout(function (){
console.debug("===============>ActsSubscriberTestUnorderSystem_0200 delay 1s==================i :"+i); console.debug("===============>ActsSubscriberTestUnorderSystem_0200 delay 1s===========i:"+i);
Subscriber.publish(commonEventSubscribeInfo.events[i], publishCallback); Subscriber.publish(commonEventSubscribeInfo.events[i], publishCallback);
}, 1000); }, 1000);
} }
......
...@@ -350,8 +350,7 @@ describe('ActsSubscriberTestUnorder', async function (done) { ...@@ -350,8 +350,7 @@ describe('ActsSubscriberTestUnorder', async function (done) {
function sleep(delay) { function sleep(delay) {
var start = (new Date()).getTime(); var start = (new Date()).getTime();
while((new Date()).getTime() - start < delay) { while ((new Date()).getTime() - start < delay) {
continue;
} }
done(); done();
} }
...@@ -430,7 +429,7 @@ describe('ActsSubscriberTestUnorder', async function (done) { ...@@ -430,7 +429,7 @@ describe('ActsSubscriberTestUnorder', async function (done) {
expect(data.data).assertEqual("publish_event1000_data"); expect(data.data).assertEqual("publish_event1000_data");
if (num == 0) { if (num == 0) {
num++; num++;
}else if (num == 1) { } else if (num == 1) {
done(); done();
} }
} }
...@@ -445,14 +444,12 @@ describe('ActsSubscriberTestUnorder', async function (done) { ...@@ -445,14 +444,12 @@ describe('ActsSubscriberTestUnorder', async function (done) {
expect(data.data).assertEqual("publish_event1000_data"); expect(data.data).assertEqual("publish_event1000_data");
if (num == 0) { if (num == 0) {
num++; num++;
}else if (num == 1) { } else if (num == 1) {
done(); done();
} }
} }
Subscriber.createSubscriber( Subscriber.createSubscriber(commonEventSubscribeInfo1).then((data)=>{
commonEventSubscribeInfo1
).then((data)=>{
console.info("=================ActsSubscriberTestUnorder_1000=========>createSubscriber Promise1000_1"); console.info("=================ActsSubscriberTestUnorder_1000=========>createSubscriber Promise1000_1");
commonEventSubscriber0101 = data; commonEventSubscriber0101 = data;
data.getSubscribeInfo().then(()=>{ data.getSubscribeInfo().then(()=>{
...@@ -461,9 +458,7 @@ describe('ActsSubscriberTestUnorder', async function (done) { ...@@ -461,9 +458,7 @@ describe('ActsSubscriberTestUnorder', async function (done) {
}); });
}); });
Subscriber.createSubscriber( Subscriber.createSubscriber(commonEventSubscribeInfo2).then((data)=>{
commonEventSubscribeInfo2
).then((data)=>{
console.info("=================ActsSubscriberTestUnorder_1000=========>createSubscriber Promise1000_2"); console.info("=================ActsSubscriberTestUnorder_1000=========>createSubscriber Promise1000_2");
commonEventSubscriber0102 = data; commonEventSubscriber0102 = data;
data.getSubscribeInfo().then(()=>{ data.getSubscribeInfo().then(()=>{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册