Fix hidden tests

pull/431/head
Mattia Iavarone 6 years ago
parent 0d854f2d57
commit 1857535bdc
  1. 16
      cameraview/src/androidTest/java/com/otaliastudios/cameraview/IntegrationTest.java

@ -418,7 +418,7 @@ public class IntegrationTest extends BaseTest {
@Test
public void testEndVideo_withMaxSize() {
camera.setMode(Mode.VIDEO);
camera.setVideoMaxSize(500*1000); // 0.5 mb
camera.setVideoMaxSize(3000*1000); // Less is risky
waitForOpen(true);
waitForVideoStart();
waitForVideoEnd(true);
@ -605,12 +605,7 @@ public class IntegrationTest extends BaseTest {
// Ensure that freeze/release cycles do not cause OOMs.
// There was a bug doing this and it might resurface for any improper
// disposal of the frames.
FrameProcessor source = new FrameProcessor() {
@Override
public void process(@NonNull Frame frame) {
frame.freeze().release();
}
};
FrameProcessor source = new FreezeReleaseFrameProcessor();
FrameProcessor processor = spy(source);
camera.addFrameProcessor(processor);
waitForOpen(true);
@ -618,5 +613,12 @@ public class IntegrationTest extends BaseTest {
assert30Frames(processor);
}
public class FreezeReleaseFrameProcessor implements FrameProcessor {
@Override
public void process(@NonNull Frame frame) {
frame.freeze().release();
}
}
//endregion
}

Loading…
Cancel
Save