提交 3fca411a 编写于 作者: N nan-xiansen

【resourceschedule】优化长时任务模块用例稳定性问题

Signed-off-by: Nnan-xiansen <nanjinbin@huawei.com>
Change-Id: I10d98f6d7b465646b7697453f89db2f1843f85cf
上级 fc8200c9
......@@ -20,6 +20,7 @@ import commonEvent from '@ohos.commonEvent';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium';
const TAG = "ContinuousTaskJsTest ";
let subscribe_;
export default function ContinuousTaskJsTest() {
describe("ContinuousTaskJsTest", function () {
......@@ -59,7 +60,8 @@ describe("ContinuousTaskJsTest", function () {
commonEvent.createSubscriber(subscribeInfo, (err, subscriber) => {
if (subscriber !== null && subscriber !== undefined) {
console.info(TAG + "Subscribe begin");
commonEvent.subscribe(subscriber, (err, data) => {
subscribe_ = subscriber;
commonEvent.subscribe(subscribe_, (err, data) => {
if (data !== null && data !== undefined) {
console.info(TAG + "Get comment event: " + JSON.stringify(data));
if (data.event === event) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册