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

!9217 用例结束增加删除数据库命令,避免重复执行相同文件名资源创建失败

Merge pull request !9217 from 秦莉文/master
......@@ -19,7 +19,11 @@
"power-shell setmode 602"
],
"teardown-command":[
"power-shell setmode 600"
"power-shell setmode 600",
"rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*",
"kill -9 `pidof com.ohos.medialibrary.medialibrarydata`",
"scanner",
"sleep 5"
]
},
{
......
......@@ -781,21 +781,30 @@ describe('CameraManagerTest', function () {
expect().assertFail();
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ON_CAMERASTATUS_0100 to operate");
mCameraManager.on('cameraStatus', async (err, data) => {
mCameraManager.on('cameraStatus', async (err, CameraStatusInfo) => {
if (!err) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ON_CAMERASTATUS_0100 camera:" + JSON.stringify(CameraStatusInfo.camera));
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ON_CAMERASTATUS_0100 status:" + JSON.stringify(CameraStatusInfo.status));
expect(true).assertTrue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ON_CAMERASTATUS_0100 success");
} else {
expect().assertFail();
console.info(TAG + "Error in SUB_MULTIMEDIA_CAMERA_ON_CAMERASTATUS_0100 FAILED: " + err.message);
}
await sleep(1000);
done();
})
try {
let camerasArray = mCameraDevicesArray;
let cameraInputPromise = mCameraManager.createCameraInput(camerasArray[0]);
await cameraInputPromise.open()
await sleep(500)
await cameraInputPromise.close()
} catch (err) {
expect().assertFail();
console.info(TAG + "Error in SUB_MULTIMEDIA_CAMERA_ON_CAMERASTATUS_0100 err: " + JSON.stringify(err));
done()
}
}
await sleep(1000);
done();
})
})
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册