提交 c700857a 编写于 作者: L lidan1004

修改用例超时

Signed-off-by: Nlidan1004 <lidan212@huawei.com>
上级 3cc42ce3
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
"description": "Configuration for powermgr battery Tests", "description": "Configuration for powermgr battery Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "60000", "test-timeout": "90000",
"package": "com.example.mybatteryapp", "package": "com.example.mybatteryapp",
"shell-timeout": "60000" "shell-timeout": "90000"
}, },
"kits": [ "kits": [
{ {
......
...@@ -37,7 +37,7 @@ function test14() { ...@@ -37,7 +37,7 @@ function test14() {
setTimeout(() => { setTimeout(() => {
let level = thermal.getThermalLevel(); let level = thermal.getThermalLevel();
console.info("level is: " + level); console.info("level is: " + level);
expect(level == -1).assertTrue(); expect(level >= 0 && level <= 6).assertTrue();
resolve(); resolve();
done(); done();
}, MSEC_1000 * 4); }, MSEC_1000 * 4);
...@@ -54,7 +54,7 @@ function test15() { ...@@ -54,7 +54,7 @@ function test15() {
it('Thermal_015', 0, async function (done) { it('Thermal_015', 0, async function (done) {
thermal.subscribeThermalLevel((level) => { thermal.subscribeThermalLevel((level) => {
console.info("level is: " + level); console.info("level is: " + level);
expect(level == -1).assertTrue(); expect(level >= 0 && level <= 6).assertTrue();
done(); done();
}) })
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册