From 928a825f25a7c5bedcd5af8b52241f5f24125f67 Mon Sep 17 00:00:00 2001 From: liushuling Date: Thu, 13 Oct 2022 11:56:01 +0000 Subject: [PATCH] update security/access_token/AccessTokenTest_Normal_js/src/main/js/test/AccessToken.test.js. Signed-off-by: liushuling --- .../src/main/js/test/AccessToken.test.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 b9a08d3fc..ac4da46e6 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(); }) -- GitLab