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

!5280 faultlogger bug fix

Merge pull request !5280 from chenxuihui/master
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
import faultlogger from '@ohos.faultLogger' import faultlogger from '@ohos.faultLogger'
import hiSysEvent from '@ohos.hiSysEvent'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
export default function FaultlogJsTest() { export default function FaultlogJsTest() {
...@@ -145,25 +145,22 @@ describe("FaultlogJsTest", function () { ...@@ -145,25 +145,22 @@ describe("FaultlogJsTest", function () {
try { try {
let now = Date.now(); let now = Date.now();
console.info("DFX_DFR_Faultlogger_Interface_0500 2 + " + now); console.info("DFX_DFR_Faultlogger_Interface_0500 2 + " + now);
const loopTimes = 2; hiSysEvent.write({
let i = 0; domain: "ACE",
let pro = new Promise( name: "JS_ERROR",
(r, e) => { eventType: hiSysEvent.EventType.FAULT,
setTimeout(function run() { params: {
if (i < loopTimes) { PID: 487,
setTimeout(run, 1001); UID:103,
} else { PACKAGE_NAME: "com.ohos.faultlogger.test",
r("done!") PROCESS_NAME: "com.ohos.faultlogger.test",
return MSG: "faultlogger testcase test.",
} REASON: "faultlogger testcase test."
console.info("--------DFX_DFR_Faultlogger_Interface_0500 3 + " + i + "----------");
++i;
let dataStr = ["1", "2"]
console.info(dataStr[2].test);
}, 1001);
} }
); }).then(
await pro; (value) => {
console.log(`HiSysEvent json-callback-success value=${value}`);
})
await msleep(1000); await msleep(1000);
console.info("--------DFX_DFR_Faultlogger_Interface_0500 4" + "----------"); console.info("--------DFX_DFR_Faultlogger_Interface_0500 4" + "----------");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册