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

!9947 【xts】【master】wifi修改脚本预置条件的接口检查及内存泄漏的用例优化,BT修改用例的异常传参导致的流水线问题

Merge pull request !9947 from 权力/myfeature
......@@ -144,7 +144,7 @@ describe('btManagerGattAdvertTest', function() {
serviceValueBuffer[2] = 7;
serviceValueBuffer[3] = 8;
let setting={
interval:20,
interval:32,
txPower:-10,
connectable:true,
}
......@@ -256,7 +256,7 @@ describe('btManagerGattAdvertTest', function() {
serviceValueBuffer[2] = 7;
serviceValueBuffer[3] = 8;
let setting={
interval:16400,
interval:16384,
txPower:-10,
connectable:true,
}
......@@ -312,7 +312,7 @@ describe('btManagerGattAdvertTest', function() {
serviceValueBuffer[2] = 7;
serviceValueBuffer[3] = 8;
let setting={
interval:19,
interval:32,
txPower:-10,
connectable:true,
}
......
......@@ -213,20 +213,19 @@ describe('btManagerGattManagerTest', function() {
it('SUB_COMMUNICATION_BTMANAGER_GETDEVICENAME_0100', 0, async function (done) {
try {
gattClient.connect();
let deviceName = gattClient.getDeviceName().then((data) => {
await gattClient.getDeviceName().then((data) => {
console.info('[bluetooth_js] getDeviceName data info:' + JSON.stringify(data));
})
console.info('[bluetooth_js] deviceName:' + deviceName);
// }).catch(err => {
// console.error('[bluetooth_js] bluetooth getDeviceName has error: '+ JSON.stringify(err));
// expect(err.code).assertEqual(2900099);
// done();
// });
done();
} catch (error) {
console.error(`[bluetooth_js]GetDeviceName_0100 failed, code is ${error.code},message is ${error.message}`);
if (error.code == '2900099') {
expect(error.code).assertEqual('2900099');
} else {
expect(error.code).assertEqual(2900099);
}
}
gattClient.disconnect();
done();
})
......
......@@ -545,7 +545,7 @@ describe('btManagerError003Test', function() {
serviceValueBuffer[2] = 7;
serviceValueBuffer[3] = 8;
let setting={
interval:20,
interval:32,
txPower:-10,
connectable:true,
}
......
......@@ -49,9 +49,6 @@ function sleep(delay) {
return new Promise(resovle => setTimeout(resovle, delay))
}
function checkWifiPowerOn(){
console.info("[wifi_test]wifi status:" + wifiMg.isWifiActive());
}
function resolveIP(ip) {
return (ip>>24 & 0xFF) + "." + (ip>>16 & 0xFF) + "." + (ip>>8 & 0xFF) + "." + (ip & 0xFF);
}
......@@ -65,7 +62,6 @@ export default function actsWifiErrorCode201Test() {
})
beforeEach(function () {
checkWifiPowerOn();
})
afterEach(function () {
})
......
......@@ -116,7 +116,12 @@ export default function actsWifiManagerEventTest() {
console.info("[wifi_test]wifiScanStateChange callback, result: " + JSON.stringify(result));
}
wifiMg.on(wifiScanState, wifiScanStateChangeCallback);
try {
let scanResult = wifiMg.scan();
} catch (error) {
console.error(`scan failed, code is ${error.code}, message is ${error.message}`);
expect(true).assertEqual(error !=null);
}
await sleep(3000);
wifiMg.off(wifiScanState, wifiScanStateChangeCallback);
done();
......
......@@ -117,7 +117,12 @@ export default function actsWifiEventTest() {
console.info("[wifi_test]wifiScanStateChange callback, result: " + JSON.stringify(result));
}
wifi.on(wifiScanState, wifiScanStateChangeCallback);
try {
let scanResult = wifi.scan();
} catch (error) {
console.error(`scan failed, code is ${error.code}, message is ${error.message}`);
expect(true).assertEqual(error !=null);
}
await sleep(3000);
wifi.off(wifiScanState, wifiScanStateChangeCallback);
done();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册