未验证 提交 b7ee3082 编写于 作者: O openharmony_ci 提交者: Gitee

!8374 【resourceschedule】【OpenHarmony-3.2-Release】优化长时任务模块用例稳定性问题

Merge pull request !8374 from 南先森/cherry-pick-1680792882
......@@ -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.
先完成此消息的编辑!
想要评论请 注册