Skip to content

Commit b63adfc

Browse files
committed
fix: stabilize controller Harness execution
1 parent b047e10 commit b63adfc

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

apps/simple-camera/__tests__/visioncamera.controller.exposure.harness.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ describe('VisionCamera - Controller Exposure', () => {
99
let factory: CameraDeviceFactory
1010
let backDevice: CameraDevice
1111

12+
const createContinuousOutput = () =>
13+
VisionCamera.createFrameOutput({
14+
targetResolution: CommonResolutions.HD_16_9,
15+
pixelFormat: 'native',
16+
enablePreviewSizedOutputBuffers: false,
17+
enablePhysicalBufferRotation: false,
18+
enableCameraMatrixDelivery: false,
19+
allowDeferredStart: false,
20+
dropFramesWhileBusy: true,
21+
})
22+
1223
beforeAll(async () => {
1324
await VisionCamera.requestCameraPermission()
1425
expect(VisionCamera.cameraPermissionStatus).toBe('authorized')
@@ -30,10 +41,14 @@ describe('VisionCamera - Controller Exposure', () => {
3041
quality: 0.8,
3142
qualityPrioritization: 'balanced',
3243
})
44+
const frameOutput = createContinuousOutput()
3345
const [controller] = await session.configure([
3446
{
3547
input: backDevice,
36-
outputs: [{ output: photoOutput, mirrorMode: 'auto' }],
48+
outputs: [
49+
{ output: photoOutput, mirrorMode: 'auto' },
50+
{ output: frameOutput, mirrorMode: 'auto' },
51+
],
3752
constraints: [],
3853
},
3954
])
@@ -69,10 +84,14 @@ describe('VisionCamera - Controller Exposure', () => {
6984
quality: 0.8,
7085
qualityPrioritization: 'balanced',
7186
})
87+
const frameOutput = createContinuousOutput()
7288
const [controller] = await session.configure([
7389
{
7490
input: backDevice,
75-
outputs: [{ output: photoOutput, mirrorMode: 'auto' }],
91+
outputs: [
92+
{ output: photoOutput, mirrorMode: 'auto' },
93+
{ output: frameOutput, mirrorMode: 'auto' },
94+
],
7695
constraints: [],
7796
},
7897
])

apps/simple-camera/device-farm-tests/AwsTestSpecIOS.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ phases:
7575
--harnessRunner ios \
7676
--reporters=default \
7777
--reporters=jest-junit \
78+
--forceExit \
7879
--verbose 2>&1 | tee "$HARNESS_LOG"
7980
8081
artifacts:

0 commit comments

Comments
 (0)