diff --git a/security/access_token/AccessTokenTest_Normal_js/src/main/js/test/AccessToken.test.js b/security/access_token/AccessTokenTest_Normal_js/src/main/js/test/AccessToken.test.js index b9a08d3fcb25ff5306e68671c75cf07fd22cb165..ac4da46e6329a8a437273500828d619014ce0005 100644 --- a/security/access_token/AccessTokenTest_Normal_js/src/main/js/test/AccessToken.test.js +++ b/security/access_token/AccessTokenTest_Normal_js/src/main/js/test/AccessToken.test.js @@ -247,9 +247,13 @@ describe('AccessTokenTest', function () { it('Test_checkAccessToken_002', 0, async function(done){ console.info("Test_checkAccessToken_002 start"); var atManager = abilityAccessCtrl.createAtManager(); - var result = await atManager.checkAccessToken(tokenID, permissionNameSystem); - console.info("Test_checkAccessToken_002 tokenID" + tokenID + "-" + result) - expect(result).assertEqual(GrantStatus.PERMISSION_GRANTED); + try { + var result = await atManager.checkAccessToken(tokenID, permissionNameSystem); + console.info("Test_checkAccessToken_002 tokenID" + tokenID + "-" + result) + expect(result).assertEqual(GrantStatus.PERMISSION_GRANTED); + } catch(error) { + console.info("Test_checkAccessToken_002 error code" + error.code + "error message" + error.message); + } done(); })