From 15356db179d079054e652f6a03945be87154b704 Mon Sep 17 00:00:00 2001 From: chenxuihui Date: Tue, 12 Jul 2022 14:49:29 +0800 Subject: [PATCH] Hidebug.test.js fix bug Signed-off-by: chenxuihui --- .../src/main/js/default/test/Hidebug.test.js | 27 +++++++------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/hiviewdfx/hidebugtest/hidebugtestjstest/src/main/js/default/test/Hidebug.test.js b/hiviewdfx/hidebugtest/hidebugtestjstest/src/main/js/default/test/Hidebug.test.js index f6f0e3c93..05daa0629 100644 --- a/hiviewdfx/hidebugtest/hidebugtestjstest/src/main/js/default/test/Hidebug.test.js +++ b/hiviewdfx/hidebugtest/hidebugtestjstest/src/main/js/default/test/Hidebug.test.js @@ -71,7 +71,7 @@ describe('HidebugJsTest', function () { * @tc.name : getPss * @tc.desc : Get application process proportional set size memory information */ - it('DFX_DFR_Hiprofiler_Interface_0004', 0, async function (done) { + it('DFX_DFR_Hiprofiler_Interface_0004', 0, function () { console.log('************* DFX_DFR_Hiprofiler_Interface_0004 Test start*************'); try { const times = 3; @@ -87,7 +87,6 @@ describe('HidebugJsTest', function () { expect().assertFail(); } console.log('************* DFX_DFR_Hiprofiler_Interface_0004 Test end*************'); - done(); }); /* @@ -95,7 +94,7 @@ describe('HidebugJsTest', function () { * @tc.name : getSharedDirty * @tc.desc : Obtains the size of the shared dirty memory of a process. */ - it('DFX_DFR_Hiprofiler_Interface_0005', 0, async function (done) { + it('DFX_DFR_Hiprofiler_Interface_0005', 0, function () { console.log('************* DFX_DFR_Hiprofiler_Interface_0005 Test start*************'); try { let dirty = hidebug.getSharedDirty(); @@ -105,7 +104,6 @@ describe('HidebugJsTest', function () { expect().assertFail(); } console.log('************* DFX_DFR_Hiprofiler_Interface_0005 Test end*************'); - done(); }); /* @@ -113,7 +111,7 @@ describe('HidebugJsTest', function () { * @tc.name : startProfiling with normal parameter * @tc.desc : Start CPU Profiling. */ - it('DFX_DFR_Hiprofiler_Interface_0006', 0, async function (done) { + it('DFX_DFR_Hiprofiler_Interface_0006', 0, function () { console.log('************* DFX_DFR_Hiprofiler_Interface_0006 Test start*************'); try { let timestamp = Date.now(); @@ -129,7 +127,6 @@ describe('HidebugJsTest', function () { expect().assertFail(); } console.log('************* DFX_DFR_Hiprofiler_Interface_0006 Test end*************'); - done(); }); /* @@ -137,7 +134,7 @@ describe('HidebugJsTest', function () { * @tc.name : startProfiling repeatedly * @tc.desc : Start CPU Profiling. */ - it('DFX_DFR_Hiprofiler_Interface_0007', 0, async function (done) { + it('DFX_DFR_Hiprofiler_Interface_0007', 0, function () { console.log('************* DFX_DFR_Hiprofiler_Interface_0007 Test start*************'); try { let path1 = '/data/app/el2/100/base/com.hidebug.test/files/cpuprofiler-111.json' @@ -157,7 +154,6 @@ describe('HidebugJsTest', function () { expect().assertFail(); } console.log('************* DFX_DFR_Hiprofiler_Interface_0007 Test end*************'); - done(); }); /* @@ -165,7 +161,7 @@ describe('HidebugJsTest', function () { * @tc.name : startProfiling with empty parameter * @tc.desc : Start CPU Profiling. */ - it('DFX_DFR_Hiprofiler_Interface_0008', 0, async function (done) { + it('DFX_DFR_Hiprofiler_Interface_0008', 0, function () { console.log('************* DFX_DFR_Hiprofiler_Interface_0008 Test start*************'); let path = '/data/app/el2/100/base/com.hidebug.test/files/undefined.json' try { @@ -185,7 +181,6 @@ describe('HidebugJsTest', function () { expect().assertFail(); } console.log('************* DFX_DFR_Hiprofiler_Interface_0008 Test end*************'); - done(); }); /* @@ -193,7 +188,7 @@ describe('HidebugJsTest', function () { * @tc.name : startProfiling with overlong parameter * @tc.desc : Start CPU Profiling. */ - it('DFX_DFR_Hiprofiler_Interface_0009', 0, async function (done) { + it('DFX_DFR_Hiprofiler_Interface_0009', 0, function () { console.log('************* DFX_DFR_Hiprofiler_Interface_0009 Test start*************'); let path = '/data/app/el2/100/base/com.hidebug.test/files/undefined.json' try { @@ -217,7 +212,6 @@ describe('HidebugJsTest', function () { expect().assertFail(); } console.log('************* DFX_DFR_Hiprofiler_Interface_0009 Test end*************'); - done(); }); /* @@ -225,7 +219,7 @@ describe('HidebugJsTest', function () { * @tc.name : dumpHeapData with normal parameter * @tc.desc : Dump JS Virtual Machine Heap Snapshot. */ - it('DFX_DFR_Hiprofiler_Interface_0010', 0, async function (done) { + it('DFX_DFR_Hiprofiler_Interface_0010', 0, function () { console.log('************* DFX_DFR_Hiprofiler_Interface_0010 Test start*************'); try { let timestamp = Date.now(); @@ -239,7 +233,6 @@ describe('HidebugJsTest', function () { expect().assertFail(); } console.log('************* DFX_DFR_Hiprofiler_Interface_0010 Test end*************'); - done(); }); /* @@ -247,7 +240,7 @@ describe('HidebugJsTest', function () { * @tc.name : dumpHeapData with empty parameter * @tc.desc : Dump JS Virtual Machine Heap Snapshot. */ - it('DFX_DFR_Hiprofiler_Interface_0011', 0, async function (done) { + it('DFX_DFR_Hiprofiler_Interface_0011', 0, function () { console.log('************* DFX_DFR_Hiprofiler_Interface_0011 Test start*************'); let path = '/data/app/el2/100/base/com.hidebug.test/files/undefined.heapsnapshot' try { @@ -265,7 +258,6 @@ describe('HidebugJsTest', function () { expect().assertFail(); } console.log('************* DFX_DFR_Hiprofiler_Interface_0011 Test end*************'); - done(); }); /* @@ -273,7 +265,7 @@ describe('HidebugJsTest', function () { * @tc.name : dumpHeapData with overlog parameter * @tc.desc : Dump JS Virtual Machine Heap Snapshot. */ - it('DFX_DFR_Hiprofiler_Interface_0012', 0, async function (done) { + it('DFX_DFR_Hiprofiler_Interface_0012', 0, function () { console.log('************* DFX_DFR_Hiprofiler_Interface_0012 Test start*************'); let path = '/data/app/el2/100/base/com.hidebug.test/files/undefined.heapsnapshot' try { @@ -295,7 +287,6 @@ describe('HidebugJsTest', function () { expect().assertFail(); } console.log('************* DFX_DFR_Hiprofiler_Interface_0012 Test end*************'); - done(); }); /* -- GitLab