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

!7155 【媒体子系统】修改超时导致用例失败

Merge pull request !7155 from 秦莉文/master
...@@ -449,20 +449,19 @@ export default function audioCapturer() { ...@@ -449,20 +449,19 @@ export default function audioCapturer() {
}) })
} }
async function driveFn() { async function driveFn() {
console.info(`come in driveFn`) console.info(`come in driveFn`);
let driver = await UiDriver.create() let driver = await UiDriver.create();
console.info(`driver is ${JSON.stringify(driver)}`) console.info(`driver is ${JSON.stringify(driver)}`);
await sleep(2000) await sleep(100);
console.info(`UiDriver start`) console.info(`UiDriver start`);
let button = await driver.findComponent(BY.text('允许')) let button = await driver.findComponent(BY.text('允许'));
console.info(`button is ${JSON.stringify(button)}`) console.info(`button is ${JSON.stringify(button)}`);
await sleep(5000) await sleep(100);
await button.click() await button.click();
} }
beforeAll(async function () { beforeAll(async function () {
await getPermission(); await getPermission();
sleep(2000)
await driveFn(); await driveFn();
console.info('TestLog: Start Testing AudioFrameworkTest Interfaces'); console.info('TestLog: Start Testing AudioFrameworkTest Interfaces');
}) })
......
...@@ -37,22 +37,20 @@ describe('audioCapturerChange', function () { ...@@ -37,22 +37,20 @@ describe('audioCapturerChange', function () {
}) })
} }
async function driveFn() { async function driveFn() {
console.info(`come in driveFn`) console.info(`come in driveFn`);
let driver = await UiDriver.create() let driver = await UiDriver.create();
console.info(`driver is ${JSON.stringify(driver)}`) console.info(`driver is ${JSON.stringify(driver)}`);
await sleep(2000) await sleep(100);
console.info(`UiDriver start`) console.info(`UiDriver start`);
let button = await driver.findComponent(BY.text('允许')) let button = await driver.findComponent(BY.text('允许'));
console.info(`button is ${JSON.stringify(button)}`) console.info(`button is ${JSON.stringify(button)}`);
await sleep(5000) await sleep(100);
await button.click() await button.click();
} }
beforeAll(async function () { beforeAll(async function () {
await getPermission(); await getPermission();
sleep(2000)
await driveFn(); await driveFn();
await sleep(5000);
audioStreamManager = audioManager.getStreamManager(); audioStreamManager = audioManager.getStreamManager();
audioStreamManagerCB = audioManager.getStreamManager(); audioStreamManagerCB = audioManager.getStreamManager();
console.info('TestLog: Start Testing AudioFrameworkTest Interfaces'); console.info('TestLog: Start Testing AudioFrameworkTest Interfaces');
......
...@@ -105,22 +105,20 @@ describe('audioFramework', function () { ...@@ -105,22 +105,20 @@ describe('audioFramework', function () {
}) })
} }
async function driveFn() { async function driveFn() {
console.info(`come in driveFn`) console.info(`come in driveFn`);
let driver = await UiDriver.create() let driver = await UiDriver.create();
console.info(`driver is ${JSON.stringify(driver)}`) console.info(`driver is ${JSON.stringify(driver)}`);
sleep(2000) await sleep(100);
console.info(`UiDriver start`) console.info(`UiDriver start`);
let button = await driver.findComponent(BY.text('允许')) let button = await driver.findComponent(BY.text('允许'));
console.info(`button is ${JSON.stringify(button)}`) console.info(`button is ${JSON.stringify(button)}`);
await sleep(5000) await sleep(100);
await button.click() await button.click();
} }
beforeAll(async function () { beforeAll(async function () {
await getPermission(); await getPermission();
sleep(2000)
await driveFn(); await driveFn();
await sleep(1000);
await getAudioManager(); await getAudioManager();
console.info('TestLog: Start Testing AudioFrameworkTest Interfaces'); console.info('TestLog: Start Testing AudioFrameworkTest Interfaces');
}) })
......
...@@ -40,26 +40,21 @@ describe('audioVoip', function () { ...@@ -40,26 +40,21 @@ describe('audioVoip', function () {
}) })
} }
async function driveFn() { async function driveFn() {
console.info(`come in driveFn`) console.info(`come in driveFn`);
let driver = await UiDriver.create() let driver = await UiDriver.create();
console.info(`driver is ${JSON.stringify(driver)}`) console.info(`driver is ${JSON.stringify(driver)}`);
await sleep(2000) await sleep(100);
console.info(`UiDriver start`) console.info(`UiDriver start`);
let button = await driver.findComponent(BY.text('允许')) let button = await driver.findComponent(BY.text('允许'));
while(button){ console.info(`button is ${JSON.stringify(button)}`);
console.info(`button is ${JSON.stringify(button)}`) await sleep(100);
await button.click() await button.click();
await sleep(5000)
button = await driver.findComponent(BY.text('允许'))
}
} }
beforeAll(async function () { beforeAll(async function () {
console.info(`AudioFrameworkTest: beforeAll: Prerequisites at the test suite level`); console.info(`AudioFrameworkTest: beforeAll: Prerequisites at the test suite level`);
await getPermission(); await getPermission();
sleep(2000)
await driveFn(); await driveFn();
await sleep(100);
console.info(`AudioFrameworkTest: beforeAll: END`); console.info(`AudioFrameworkTest: beforeAll: END`);
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册