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

!10015 AVSession后置方法优化

Merge pull request !10015 from 杜蕊/master
......@@ -640,6 +640,8 @@ export default function AVSession() {
console.info(`TestLog: Set metadata error: code: ${err.code}, message: ${err.message}`);
expect(true).assertTrue();
});
sleep(200);
session = await avSession.createAVSession(context,tag,type);
done();
})
......@@ -1025,6 +1027,8 @@ export default function AVSession() {
console.info(`TestLog: Set playbackState error: code: ${err.code}, message: ${err.message}`);
expect(true).assertTrue();
});
sleep(200);
session = await avSession.createAVSession(context,tag,type);
done();
})
......
......@@ -645,9 +645,10 @@ export default function AVSessionCallback() {
console.info('TestLog: Set metadata : successfully');
expect(false).assertTrue();
}
done();
})
await sleep(500);
session = await avSession.createAVSession(context,tag,type);
done();
})
/* *
......@@ -1050,9 +1051,10 @@ export default function AVSessionCallback() {
console.info('TestLog: Set playbackState successfully');
expect(false).assertTrue();
}
done();
})
await sleep(500);
session = await avSession.createAVSession(context,tag,type);
done();
})
/* *
......@@ -1237,6 +1239,7 @@ export default function AVSessionCallback() {
console.info('TestLog: Session destroyed failed');
expect(false).assertTrue();
}
session = await avSession.createAVSession(context,tag,type);
done();
})
})
......
......@@ -65,18 +65,22 @@ export default function AVSessionErrorCode() {
afterEach(async function (done) {
console.info('TestLog: Destroy Session And Controller');
if(session){
await session.destroy().then(() => {
console.info('TestLog: Session destroy success');
}).catch((err) => {
console.info(`TestLog: Session destroy error: code: ${err.code}, message: ${err.message}`);
expect(false).assertTrue();
});
}
if(controller){
await controller.destroy().then(() => {
console.info('TestLog: Controller destroy success');
}).catch((err) => {
console.info(`TestLog: Controller destroy error: code: ${err.code}, message: ${err.message}`);
expect(false).assertTrue();
});
}
done();
})
......@@ -127,6 +131,8 @@ export default function AVSessionErrorCode() {
console.info(`TestLog: Controller destroy error: code: ${err.code}, message: ${err.message}`);
expect(false).assertTrue();
});
await sleep(200);
controller = await session.getController();
done();
})
......
......@@ -89,6 +89,8 @@ export default function AVSessionManager() {
console.info(`TestLog: avSession create error: code: ${err.code}, message: ${err.message}`);
expect(true).assertTrue();
});
sleep(200);
currentAVSession = await avSession.createAVSession(context,tag,"audio");
done();
})
......@@ -107,7 +109,8 @@ export default function AVSessionManager() {
console.info(`TestLog: avSession create error: code: ${err.code}, message: ${err.message}`);
expect(true).assertTrue();
});
sleep(200);
currentAVSession = await avSession.createAVSession(context,tag,"audio");
done();
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册