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

!3053 modify testcases to solve jscrash

Merge pull request !3053 from ling990/ling990
......@@ -748,10 +748,11 @@ describe('AudioDecoderFuncCallback', function () {
})
});
eventEmitter.on('start', () => {
audioDecodeProcessor.start((err) => {
audioDecodeProcessor.start(async(err) => {
expect(err).assertUndefined();
console.info(`case start 1`);
setTimeout(() => {eventEmitter.emit('flush')},2000)
await sleep(2000);
eventEmitter.emit('flush');
})
});
eventEmitter.on('flush', () => {
......@@ -759,7 +760,7 @@ describe('AudioDecoderFuncCallback', function () {
outputQueue = [];
audioDecodeProcessor.flush((err) => {
expect(err).assertUndefined();
console.info(`case flush after 2s`);
console.info(`case flush after 2s success`);
})
});
media.createAudioDecoderByMime('audio/mp4a-latm', (err, processor) => {
......
......@@ -582,10 +582,11 @@ describe('AudioEncoderFuncCallback', function () {
})
});
eventEmitter.on('start', () => {
audioEncodeProcessor.start((err) => {
audioEncodeProcessor.start(async(err) => {
expect(err).assertUndefined();
console.info(`case start 1`);
setTimeout(() => {eventEmitter.emit('flush')},5000)
await sleep(2000);
eventEmitter.emit('flush');
})
});
eventEmitter.on('flush', () => {
......@@ -593,7 +594,7 @@ describe('AudioEncoderFuncCallback', function () {
outputQueue = [];
audioEncodeProcessor.flush((err) => {
expect(err).assertUndefined();
console.info(`case flush after 5s`);
console.info(`case flush after 2s success`);
})
});
media.createAudioEncoderByMime('audio/mp4a-latm', (err, processor) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册