From 25f7f937b7b29cd58f763c9089a181114b27e418 Mon Sep 17 00:00:00 2001 From: FULIZHONG Date: Thu, 26 May 2022 03:06:52 +0000 Subject: [PATCH] add sleep time in audiorecorder Signed-off-by: FULIZHONG --- .../src/main/js/test/RecorderLocalTestAudioAPI.test.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js b/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js index 4f18aa59b..da5629ef4 100644 --- a/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js +++ b/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js @@ -33,6 +33,7 @@ describe('RecorderLocalTestAudioAPI', function () { const ENCORDER_AACLC = 3; const CHANNEL_TWO = 2; const RECORDER_TIME = 3000; + const PAUSE_TIME = 1000; let fdPath; let fileAsset; let fdNumber; @@ -119,12 +120,14 @@ describe('RecorderLocalTestAudioAPI', function () { audioRecorder.on('pause', () => { console.info('setCallback pause() case callback is called'); + sleep(PAUSE_TIME); mySteps.shift(); nextStep(mySteps,done); }); audioRecorder.on('resume', () => { console.info('setCallback resume() case callback is called'); + sleep(RECORDER_TIME); mySteps.shift(); nextStep(mySteps,done); }); @@ -614,7 +617,7 @@ describe('RecorderLocalTestAudioAPI', function () { * @tc.type : Reliability * @tc.level : Level2 */ - it('SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0500', 0, async function (done) { + it('SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0600', 0, async function (done) { initAudioRecorder(); let mySteps = new Array(PRE_STATE, START_STATE, RESET_STATE, PAUSE_STATE, ERROR_STATE, RELEASE_STATE, END_STATE); @@ -646,7 +649,7 @@ describe('RecorderLocalTestAudioAPI', function () { * @tc.type : Reliability * @tc.level : Level2 */ - it('SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0800', 0, async function (done) { + it('SUB_MEDIA_RECORDER_AudioRecorder_Pause_API_0900', 0, async function (done) { initAudioRecorder(); let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, PAUSE_STATE, PAUSE_STATE, RELEASE_STATE, END_STATE); -- GitLab