提交 94e6e444 编写于 作者: Z zhaoyuan17

Bms xts update

Signed-off-by: Nzhaoyuan17 <zhaoyuan17@huawei.com>
上级 dd6dd162
......@@ -91,7 +91,9 @@ describe('ActsBmsKitTest', function () {
it('ActsBmsKit_getAllShortcutInfo_0200', 0, async function (done) {
console.info('=====================ActsBmsKit_getAllShortcutInfo_0200==================');
var bundleName = 'com.example.third1';
for (let count = 0; count < STRESSLEVEL; count++) {
let flag = true;
let count = 0;
for (let i = 0; i < STRESSLEVEL; i++) {
bundle.getAllShortcutInfo(bundleName, async (err, data) => {
expect(data.length).assertEqual(1);
expect(err.code).assertEqual(0);
......@@ -101,9 +103,14 @@ describe('ActsBmsKitTest', function () {
} else if (err.code != 0) {
console.log('call function level is: ' + count);
expect().assertFail();
done();
flag = false;
}
count++;
})
if (!flag) {
done();
break;
}
}
})
......@@ -132,8 +139,10 @@ describe('ActsBmsKitTest', function () {
*/
it('ActsBmsKit_checkPermission_0200', 0, async function (done) {
console.info('=====================ActsBmsKit_checkPermission_0200==================');
for (let count = 0; count < STRESSLEVEL; count++) {
await bundle.checkPermission(BUNDLE_NAME, PERMISSION_NAME, (err, data) => {
let flag = true;
let count = 0;
for (let i = 0; i < STRESSLEVEL; i++) {
bundle.checkPermission(BUNDLE_NAME, PERMISSION_NAME, (err, data) => {
expect(err.code).assertEqual(0);
expect(data).assertEqual(0);
console.log('checkPermission is granted: ' + data);
......@@ -142,9 +151,14 @@ describe('ActsBmsKitTest', function () {
} else if (err.code != 0 || data != 0) {
console.log('call function level is: ' + count);
expect().assertFail();
done();
flag = false;
}
count++;
})
if (!flag) {
done();
break;
}
}
})
......@@ -178,6 +192,7 @@ describe('ActsBmsKitTest', function () {
console.debug('=====================ActsBmsKit_getModuleUsageRecordTest_0200==================');
var bundleName = 'com.example.third1';
let count = 0;
let flag = true;
for (let i = 0; i < STRESSLEVEL; i++) {
bundle.getModuleUsageRecords(50, (err, data) => {
expect(err.code).assertEqual(0);
......@@ -189,10 +204,14 @@ describe('ActsBmsKitTest', function () {
} else if (err.code != 0) {
console.log('call function level is: ' + count);
expect().assertFail();
done();
flag = false;
}
count++;
});
if (!flag) {
done();
break;
}
}
})
function checkModuleUsageRecord(data, caseName) {
......
......@@ -24,7 +24,7 @@ const BUNDLE_NAME = 'com.example.third1';
const NUM_TWO = 2;
const NUM_TEN = 10;
const INVALID_NUM = -1;
const START_ABILITY_TIMEOUT = 3000;
const START_ABILITY_TIMEOUT = 5000;
const START_RECORD = 900;
const TIMEOUT = 3000;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册