未验证 提交 679559de 编写于 作者: O openharmony_ci 提交者: Gitee

!9414 apprecovery和abilityconstant测试套内存泄漏整改

Merge pull request !9414 from chenxuihui/master
...@@ -25,6 +25,7 @@ class AbilityTest extends Ability { ...@@ -25,6 +25,7 @@ class AbilityTest extends Ability {
return AbilityConstant.OnSaveResult.ALL_REJECT return AbilityConstant.OnSaveResult.ALL_REJECT
} }
} }
let ability_test = new AbilityTest();
export default function ActsAbilityConstantTest() { export default function ActsAbilityConstantTest() {
describe("ActsAbilityConstantTest", function () { describe("ActsAbilityConstantTest", function () {
...@@ -36,7 +37,6 @@ describe("ActsAbilityConstantTest", function () { ...@@ -36,7 +37,6 @@ describe("ActsAbilityConstantTest", function () {
it("DFX_DFR_AbilityConstant_Interface_0100", 0, function () { it("DFX_DFR_AbilityConstant_Interface_0100", 0, function () {
console.info("-------------------------DFX_DFR_AbilityConstant_Interface_0100 start-------------------------"); console.info("-------------------------DFX_DFR_AbilityConstant_Interface_0100 start-------------------------");
try{ try{
let ability_test = new AbilityTest();
let StateType = AbilityConstant.StateType.APP_RECOVERY; let StateType = AbilityConstant.StateType.APP_RECOVERY;
let wantParam = {"test1": 1, "test2": 2}; let wantParam = {"test1": 1, "test2": 2};
let ret = ability_test.onSaveState(StateType, wantParam); let ret = ability_test.onSaveState(StateType, wantParam);
......
...@@ -26,6 +26,7 @@ class AbilityTest extends Ability { ...@@ -26,6 +26,7 @@ class AbilityTest extends Ability {
return AbilityConstant.OnSaveResult.ALL_REJECT return AbilityConstant.OnSaveResult.ALL_REJECT
} }
} }
let ability_test = new AbilityTest();
export default function ActsAppRecoveryTest() { export default function ActsAppRecoveryTest() {
describe("ActsAppRecoveryTest", function () { describe("ActsAppRecoveryTest", function () {
...@@ -330,7 +331,6 @@ describe("ActsAppRecoveryTest", function () { ...@@ -330,7 +331,6 @@ describe("ActsAppRecoveryTest", function () {
it("DFX_DFR_AppRecovery_Interface_1900", 0, function () { it("DFX_DFR_AppRecovery_Interface_1900", 0, function () {
console.info("-------------------------DFX_DFR_AppRecovery_Interface_1900 start-------------------------"); console.info("-------------------------DFX_DFR_AppRecovery_Interface_1900 start-------------------------");
try{ try{
let ability_test = new AbilityTest();
let StateType = AbilityConstant.StateType.APP_RECOVERY; let StateType = AbilityConstant.StateType.APP_RECOVERY;
let wantParam = {"test1": 1, "test2": 2}; let wantParam = {"test1": 1, "test2": 2};
let ret = ability_test.onSaveState(StateType, wantParam); let ret = ability_test.onSaveState(StateType, wantParam);
......
...@@ -21,9 +21,6 @@ describe("HitraceMeterTest", function () { ...@@ -21,9 +21,6 @@ describe("HitraceMeterTest", function () {
console.info("-------DFX_DFR_HitraceMeter_0100 start--------"); console.info("-------DFX_DFR_HitraceMeter_0100 start--------");
for (var i = 0; i < 3; i++) { for (var i = 0; i < 3; i++) {
console.info("DFX_DFR_HitraceMeter_0100 i = " + i) console.info("DFX_DFR_HitraceMeter_0100 i = " + i)
console.info("DFX_DFR_HitraceMeter_0100 " + i.toString() + " startTrace start");
hiTraceMeter.startTrace("test-" + i.toString(), 111 + i, 5000);
console.info("DFX_DFR_HitraceMeter_0100 " + i.toString() + "startTrace end");
console.info("DFX_DFR_HitraceMeter_0100 " + i.toString() + " finishTrace start"); console.info("DFX_DFR_HitraceMeter_0100 " + i.toString() + " finishTrace start");
hiTraceMeter.finishTrace("test-" + i.toString(), 111 + i); hiTraceMeter.finishTrace("test-" + i.toString(), 111 + i);
console.info("DFX_DFR_HitraceMeter_0100 " + i.toString() + "finishTrace end"); console.info("DFX_DFR_HitraceMeter_0100 " + i.toString() + "finishTrace end");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册