提交 9c22a462 编写于 作者: Y yygxr

fix camera session test case error

Signed-off-by: Nyygxr <wuhao30@huawei.com>
上级 41022905
......@@ -303,7 +303,13 @@ export default function cameraSessionTest(surfaceId: any) {
async function createCameraSessionInstance() {
console.info('Enter createCameraSessionInstance');
mCameraSession = await mCameraManager.createCaptureSession();
try {
mCameraSession = await mCameraManager.createCaptureSession();
}
catch {
console.info('createCaptureSession FAILED');
}
if (isEmpty(mCameraSession)) {
console.info(TAG + "createCaptureSession FAILED");
return false;
......
......@@ -340,7 +340,13 @@ export default function cameraSessionExposureTest(surfaceId: any) {
async function createCameraSessionInstance() {
console.info('Enter createCameraSessionInstance');
mCameraSession = await mCameraManager.createCaptureSession();
try {
mCameraSession = await mCameraManager.createCaptureSession();
}
catch {
console.info('createCaptureSession FAILED');
}
if (isEmpty(mCameraSession)) {
console.info(TAG + "createCaptureSession FAILED");
return false;
......@@ -759,8 +765,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
})
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_CALLBACK_0100 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_CALLBACK_0100 not support");
}
await stopCameraSession(i);
......@@ -810,8 +815,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0100 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0100 not support");
}
await stopCameraSession(i);
......@@ -965,8 +969,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
})
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_CALLBACK_0101 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_CALLBACK_0101 not support");
}
await stopCameraSession(i);
......@@ -1016,8 +1019,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0101 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0101 not support");
}
await stopCameraSession(i);
......@@ -1171,8 +1173,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
})
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_CALLBACK_0102 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_CALLBACK_0102 not support");
}
await stopCameraSession(i);
......@@ -1222,8 +1223,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0102 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0102 not support");
}
await stopCameraSession(i);
......
......@@ -293,7 +293,13 @@ export default function cameraSessionFlashTest(surfaceId: any) {
async function createCameraSessionInstance() {
console.info('Enter createCameraSessionInstance');
mCameraSession = await mCameraManager.createCaptureSession();
try {
mCameraSession = await mCameraManager.createCaptureSession();
}
catch {
console.info('createCaptureSession FAILED');
}
if (isEmpty(mCameraSession)) {
console.info(TAG + "createCaptureSession FAILED");
return false;
......@@ -702,8 +708,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
})
await sleep(1000);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_CALLBACK_0100 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_CALLBACK_0100 not support");
}
await stopCameraSession(i);
......@@ -749,8 +754,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
await sleep(1000);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0100 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0100 not support");
}
await stopCameraSession(i);
......@@ -813,8 +817,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
})
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_CALLBACK_0100 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_CALLBACK_0100 not support");
}
await stopCameraSession(i);
......@@ -864,8 +867,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0100 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0100 not support");
}
await stopCameraSession(i);
......@@ -919,8 +921,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
})
await sleep(1000);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_CALLBACK_0101 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_CALLBACK_0101 not support");
}
await stopCameraSession(i);
......@@ -966,8 +967,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
await sleep(1000);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0101 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0101 not support");
}
await stopCameraSession(i);
......@@ -1029,8 +1029,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
})
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_CALLBACK_0101 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_CALLBACK_0101 not support");
}
await stopCameraSession(i);
......@@ -1080,8 +1079,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0101 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0101 not support");
}
await stopCameraSession(i);
......@@ -1135,8 +1133,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
})
await sleep(1000);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_CALLBACK_0102 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_CALLBACK_0102 not support");
}
await stopCameraSession(i);
......@@ -1182,8 +1179,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
await sleep(1000);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0102 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0102 not support");
}
await stopCameraSession(i);
......@@ -1245,8 +1241,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
})
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_CALLBACK_0102 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_CALLBACK_0102 not support");
}
await stopCameraSession(i);
......@@ -1296,8 +1291,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0102 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0102 not support");
}
await stopCameraSession(i);
......@@ -1351,8 +1345,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
})
await sleep(1000);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_CALLBACK_0103 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_CALLBACK_0103 not support");
}
await stopCameraSession(i);
......@@ -1398,8 +1391,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
await sleep(1000);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0103 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0103 not support");
}
await stopCameraSession(i);
......@@ -1461,8 +1453,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
})
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_CALLBACK_0103 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_CALLBACK_0103 not support");
}
await stopCameraSession(i);
......@@ -1513,8 +1504,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0103 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0103 not support");
}
await stopCameraSession(i);
......
......@@ -339,7 +339,13 @@ export default function cameraSessionFocusTest(surfaceId: any) {
async function createCameraSessionInstance() {
console.info('Enter createCameraSessionInstance');
mCameraSession = await mCameraManager.createCaptureSession();
try {
mCameraSession = await mCameraManager.createCaptureSession();
}
catch {
console.info('createCaptureSession FAILED');
}
if (isEmpty(mCameraSession)) {
console.info(TAG + "createCaptureSession FAILED");
return false;
......@@ -755,8 +761,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
})
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_CALLBACK_0100 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_CALLBACK_0100 not support");
}
await stopCameraSession(i);
......@@ -806,8 +811,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0100 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0100 not support");
}
await stopCameraSession(i);
......@@ -961,8 +965,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
})
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_CALLBACK_0101 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_CALLBACK_0101 not support");
}
await stopCameraSession(i);
......@@ -1012,8 +1015,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0101 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0101 not support");
}
await stopCameraSession(i);
......@@ -1167,8 +1169,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
})
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_CALLBACK_0102 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_CALLBACK_0102 not support");
}
await stopCameraSession(i);
......@@ -1218,8 +1219,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0102 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0102 not support");
}
await stopCameraSession(i);
......@@ -1373,8 +1373,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
})
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_CALLBACK_0103 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_CALLBACK_0103 not support");
}
await stopCameraSession(i);
......@@ -1424,8 +1423,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
}
await sleep(1000);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0103 FAILED");
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0103 not support");
}
await stopCameraSession(i);
......
......@@ -292,7 +292,13 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
async function createCameraSessionInstance() {
console.info('Enter createCameraSessionInstance');
mCameraSession = await mCameraManager.createCaptureSession();
try {
mCameraSession = await mCameraManager.createCaptureSession();
}
catch {
console.info('createCaptureSession FAILED');
}
if (isEmpty(mCameraSession)) {
console.info(TAG + "createCaptureSession FAILED");
return false;
......
......@@ -294,7 +294,13 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
async function createCameraSessionInstance() {
console.info('Enter createCameraSessionInstance');
mCameraSession = await mCameraManager.createCaptureSession();
try {
mCameraSession = await mCameraManager.createCaptureSession();
}
catch {
console.info('createCaptureSession FAILED');
}
if (isEmpty(mCameraSession)) {
console.info(TAG + "createCaptureSession FAILED");
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册