From 2578adbd4500489562324ed51a9cacdf44919a75 Mon Sep 17 00:00:00 2001 From: fulizhong Date: Thu, 22 Sep 2022 17:09:27 +0800 Subject: [PATCH] modify testcases Signed-off-by: FULIZHONG Signed-off-by: fulizhong --- .../src/main/js/test/PlayerLocalTestAudioFUNC.test.js | 3 ++- multimedia/media/media_js_standard/audioRecorder/Test.json | 2 +- .../src/main/js/test/RecorderLocalTestAudioFUNC.test.js | 2 +- .../src/main/js/test/VideoPlayerFuncPromiseTest.test.js | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js index 6a7fe6619..1098511da 100644 --- a/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js +++ b/multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js @@ -458,7 +458,8 @@ describe('PlayerLocalTestAudioFUNC', function () { console.info('case wait for next player'); } playAudioSource(fdPath, DURATION_TIME, PLAY_TIME, true, waitForDone); - mediaTestBase.msleep(1000); + await mediaTestBase.msleepAsync(1000).then( + () => {}, mediaTestBase.failureCallback).catch(mediaTestBase.catchCallback); playAudioSource(fdPath, DURATION_TIME, PLAY_TIME, true, done); }) }) diff --git a/multimedia/media/media_js_standard/audioRecorder/Test.json b/multimedia/media/media_js_standard/audioRecorder/Test.json index 73d165da8..21b2f993a 100644 --- a/multimedia/media/media_js_standard/audioRecorder/Test.json +++ b/multimedia/media/media_js_standard/audioRecorder/Test.json @@ -10,7 +10,7 @@ { "type": "ShellKit", "run-command": [ - "rm -rf /storage/media/100/local/files/Videos/audio_*", + "rm -rf /storage/media/100/local/files/Audios/audio_*", "power-shell setmode 602" ], "teardown-command":[ diff --git a/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioFUNC.test.js b/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioFUNC.test.js index c21c2701f..e91f8c25a 100644 --- a/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioFUNC.test.js +++ b/multimedia/media/media_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioFUNC.test.js @@ -626,7 +626,7 @@ describe('RecorderLocalTestAudioFUNC', function () { let trackArray = videoRecorderBase.getTrackArray(ONLYAUDIO_TYPE, audioConfig); initAudioRecorder(); let mySteps = new Array(PRE_STATE, START_STATE, PAUSE_STATE, RESUME_STATE, PAUSE_STATE, - STOP_STATE, RELEASE_STATE, CHECK_STATE, trackArray, RECORDER_TIME, END_STATE); + STOP_STATE, RELEASE_STATE, CHECK_STATE, trackArray, RECORDER_TIME * 2, END_STATE); setCallback(mySteps, done); audioRecorder.prepare(audioConfig); }) diff --git a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js index b76930195..7f19fdb11 100644 --- a/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js +++ b/multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js @@ -1233,7 +1233,7 @@ describe('VideoPlayerFuncPromiseTest', function () { expect(videoPlayer.state).assertEqual('playing'); }, mediaTestBase.failureCallback).catch(mediaTestBase.catchCallback); endTime = videoPlayer.currentTime; - checkTime(PLAY_TIME * 2, (endTime - startTime), DELTA_TIME); + checkTime(PLAY_TIME * 2, (endTime - startTime), DELTA_TIME * 2); }) }) } \ No newline at end of file -- GitLab