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

!7216 xts报错修复

Merge pull request !7216 from SongChunPeng/master
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
"test-timeout": "3000000", "test-timeout": "3000000",
"bundle-name":"com.open.harmony.multimedia.cameratest", "bundle-name":"com.open.harmony.multimedia.cameratest",
"package-name": "com.open.harmony.multimedia.cameratest", "package-name": "com.open.harmony.multimedia.cameratest",
"shell-timeout": "60000", "shell-timeout": "600000",
"testcase-timeout": 100000 "testcase-timeout": 100000
}, },
"kits": [ "kits": [
{ {
......
...@@ -1221,14 +1221,9 @@ export default function cameraJSUnitOutput() { ...@@ -1221,14 +1221,9 @@ export default function cameraJSUnitOutput() {
} else { } else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 to operate"); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 to operate");
let count = 0; let count = 0;
photoOutput.on('captureStart', async (err, data) => { photoOutput.on('captureStart', async (data) => {
if (!err) { count++;
count++; console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 success");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 success");
} else {
expect().assertFail();
console.info(TAG + "Error in SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 FAILED: " + err.message);
}
await sleep(1000); await sleep(1000);
done(); done();
}) })
...@@ -1297,18 +1292,13 @@ export default function cameraJSUnitOutput() { ...@@ -1297,18 +1292,13 @@ export default function cameraJSUnitOutput() {
} else { } else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 to operate"); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 to operate");
let count = 0; let count = 0;
photoOutput.on('captureEnd', async (err, data) => { photoOutput.on('captureEnd', async (data) => {
if (!err) { count++;
count++; console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 success");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 success"); console.info(TAG + "SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100, captureId = " + data.captureId);
console.info(TAG + "SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100, captureId = " + data.captureId); console.info(TAG + "SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100, frameCount = " + data.frameCount);
console.info(TAG + "SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100, frameCount = " + data.frameCount); await sleep(1000);
} else { done();
expect().assertFail();
console.info(TAG + "Error in SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 FAILED: " + err.message);
}
await sleep(1000);
done();
}) })
await sleep(1000); await sleep(1000);
done(); done();
......
...@@ -618,42 +618,39 @@ export default function cameraSessionTest() { ...@@ -618,42 +618,39 @@ export default function cameraSessionTest() {
}) })
/** /**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 * @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100
* @tc.name : Check capture session start/stop/release output with promise or not * @tc.name : Check capture session start/stop/release output with promise or not
* @tc.desc : Check capture session start/stop/release output with promise or not * @tc.desc : Check capture session start/stop/release output with promise or not
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100', 0, async function (done) { it('SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100', 0, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100--------------"); console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100--------------");
if (mCameraNum == 0) { if (mCameraNum == 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 FAILED with NoCamera"); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 FAILED with NoCamera");
expect().assertFail(); expect().assertFail();
done(); done();
} }
else { else {
for (let i = 0; i < mCameraNum; i++) { for (let i = 0; i < mCameraNum; i++) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 start for camera[" + i + "]"); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 start for camera[" + i + "]");
await startCameraSession(i); await startCameraSession(i);
await mCameraSession.start(); await mCameraSession.start();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 start PASSED"); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 start PASSED");
await sleep(2000); await sleep(2000);
await mCameraSession.stop(); await mCameraSession.stop();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 stop PASSED"); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 stop PASSED");
await sleep(500); await sleep(500);
await mCameraSession.release(); await stopCameraSession();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 release PASSED"); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 end for camera[" + i + "]");
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 end for camera[" + i + "]");
} }
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 ends here"); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_PROMISE_0100 ends here");
done(); done();
} }
}) })
......
...@@ -74,12 +74,12 @@ let mVideoConfig = { ...@@ -74,12 +74,12 @@ let mVideoConfig = {
maxDuration: 500 maxDuration: 500
} }
let mPicWidthMax = 8192; let mPicWidthMax = 1;
let mPicHeightMax = 8192; let mPicHeightMax = 1;
let mMETERINGPoint = { let mMETERINGPoint = {
x: mPicWidthMax / 2, x: mPicWidthMax / 2.0,
y: mPicHeightMax / 2, y: mPicHeightMax / 2.0,
} }
let mMETERINGPointLT = { let mMETERINGPointLT = {
...@@ -898,9 +898,9 @@ export default function cameraSessionExposureTest() { ...@@ -898,9 +898,9 @@ export default function cameraSessionExposureTest() {
} else { } else {
for (let i = 0; i < mCameraNum; i++) { for (let i = 0; i < mCameraNum; i++) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 start for camera[" + i + "]"); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 start for camera[" + i + "]");
await startCameraSession(i); await startCameraSession(i);
mCameraSession.setMeteringPoint(mMETERINGPointLT); mCameraSession.setMeteringPoint(mMETERINGPointLT);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 finish"); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 PASSED with METERINGPoint is: " + mMETERINGPointLT.x + ", " + mMETERINGPointLT.y); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 PASSED with METERINGPoint is: " + mMETERINGPointLT.x + ", " + mMETERINGPointLT.y);
......
...@@ -71,12 +71,12 @@ let mVideoConfig = { ...@@ -71,12 +71,12 @@ let mVideoConfig = {
maxDuration: 500 maxDuration: 500
} }
let mPicWidthMax = 8192; let mPicWidthMax = 1;
let mPicHeightMax = 8192; let mPicHeightMax = 1;
let mFocusPoint = { let mFocusPoint = {
x: mPicWidthMax / 2, x: mPicWidthMax / 2.0,
y: mPicHeightMax / 2, y: mPicHeightMax / 2.0,
} }
let mFocusPointLT = { let mFocusPointLT = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册