diff --git a/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSession.test.js b/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSession.test.js index b79fef5922ae9ba45f9417dee5c71c9d157bcfd1..a17c36257f7d6ff3f90442061f7e56755e8c91b9 100644 --- a/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSession.test.js +++ b/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSession.test.js @@ -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(); }) diff --git a/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSessionCallback.test.js b/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSessionCallback.test.js index 78a80b093ae28c0cd8777ec9ec7f33c925a55465..4316737786221a6eb3260f9eb2f510e365cdef5c 100644 --- a/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSessionCallback.test.js +++ b/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSessionCallback.test.js @@ -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(); }) }) diff --git a/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSessionErrorCode.test.js b/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSessionErrorCode.test.js index d8da364b7c1756c8c4673e7d7f5393c01c8a7c61..81e00ebd7d651c6222446a8637a0dcfeae42c760 100644 --- a/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSessionErrorCode.test.js +++ b/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSessionErrorCode.test.js @@ -65,18 +65,22 @@ export default function AVSessionErrorCode() { afterEach(async function (done) { console.info('TestLog: Destroy Session And Controller'); - await session.destroy().then(() => { + 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(); }) diff --git a/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSessionManager.test.js b/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSessionManager.test.js index ed832cd19ac90f425d3d6a97de0def2c457d5b28..657c7d57a0e7e87c65c891aea40e4b5ebc4446dd 100644 --- a/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSessionManager.test.js +++ b/multimedia/avsession/avsession_js_standard/avsessionManager/src/main/js/test/AVSessionManager.test.js @@ -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(); })