From d3dd1dcbb736c584ed0243e10273c4842cb89527 Mon Sep 17 00:00:00 2001 From: smartltt Date: Mon, 22 May 2023 15:32:38 +0800 Subject: [PATCH] =?UTF-8?q?master=20acts=E5=BB=B6=E8=BF=9F=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E5=8F=AF=E9=80=89=E5=8F=82=E6=95=B0=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: smartltt Change-Id: If039976e1aac5b3b6d0520ab35de369fd5db2762 --- .../src/main/js/test/WorkScheduler.test.js | 6 ++--- .../main/js/test/WorkSchedulerMgrJs.test.js | 26 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkScheduler.test.js b/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkScheduler.test.js index d6274b6a5..1bc5b4985 100644 --- a/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkScheduler.test.js +++ b/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkScheduler.test.js @@ -227,10 +227,10 @@ describe("WorkSchedulerJsTest", function () { try { workScheduler.startWork(workInfo); workScheduler.stopWork(workInfo, 111); - } catch ( err) { - console.info("---------------- err: " + err.code); - expect( err.code).assertEqual("401"); + expect(workScheduler.stopWork(workInfo, 111)).assertNull(); done(); + } catch ( err) { + console.info("WorkSchedulerJsTest007 ---------------- err: " + err.code); }; }) diff --git a/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkSchedulerMgrJs.test.js b/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkSchedulerMgrJs.test.js index 4a04bca2d..48eae97e3 100644 --- a/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkSchedulerMgrJs.test.js +++ b/resourceschedule/resourceschedule_standard/workscheduler/src/main/js/test/WorkSchedulerMgrJs.test.js @@ -1297,10 +1297,10 @@ export default function WorkSchedulerMgrApiTest() { try { workScheduler.startWork(workInfo); workScheduler.stopWork(workInfo, "true"); - } catch (error) { - console.info("----------------error: " + error.code); - expect(error.code).assertEqual("401"); + expect(workScheduler.stopWork(workInfo, "true")).assertNull(); done(); + } catch (error) { + console.info("testStopWorkFun001 ----------------error: " + error.code); } }) @@ -1320,11 +1320,11 @@ export default function WorkSchedulerMgrApiTest() { }; try { workScheduler.startWork(workInfo); - workScheduler.stopWork(workInfo, 111); - } catch (error) { - console.info("----------------error: " + error.code); - expect(error.code).assertEqual("401"); + workScheduler.stopWork(workInfo, undefined); + expect(workScheduler.stopWork(workInfo, undefined)).assertNull(); done(); + } catch (error) { + console.info("testStopWorkFun002 ----------------error: " + error.code); }; }) @@ -1345,10 +1345,10 @@ export default function WorkSchedulerMgrApiTest() { try { workScheduler.startWork(workInfo); workScheduler.stopWork(workInfo, null); - } catch (error) { - console.info("----------------error: " + error.code); - expect(error.code).assertEqual("401"); + expect(workScheduler.stopWork(workInfo, null)).assertNull(); done(); + } catch (error) { + console.info("testStopWorkFun003 ----------------error: " + error.code); } }) @@ -1369,10 +1369,10 @@ export default function WorkSchedulerMgrApiTest() { try { workScheduler.startWork(workInfo); workScheduler.stopWork(workInfo); - } catch (error) { - console.info("----------------error: " + error.code); - expect(error.code).assertEqual("401"); + expect(workScheduler.stopWork(workInfo)).assertNull(); done(); + } catch (error) { + console.info("testStopWorkFun004 ----------------error: " + error.code); } }) -- GitLab