From 721f17283e2493426c47bbaa267c337b2af5726e Mon Sep 17 00:00:00 2001 From: Igor Murashkin Date: Thu, 28 Feb 2013 10:41:51 -0800 Subject: ProCameraTest: Drop frames test move processing delay between lock/unlock * This makes it more likely to find races with the buffer being unlocked by itself Change-Id: I1fa7dbfb73f60664a02a35678b58bcc9b06893a2 --- camera/tests/ProCameraTests.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'camera') diff --git a/camera/tests/ProCameraTests.cpp b/camera/tests/ProCameraTests.cpp index f93e5cd..39456af 100644 --- a/camera/tests/ProCameraTests.cpp +++ b/camera/tests/ProCameraTests.cpp @@ -1001,11 +1001,6 @@ TEST_F(ProCameraTest, WaitForSingleStreamBufferAndDropFrames) { // Consume a couple of results for (int i = 0; i < NUM_REQUESTS; ++i) { - // Process at 10fps, stream is at 15fps. - // This means we will definitely fill up the buffer queue with - // extra buffers and need to drop them. - usleep(TEST_FRAME_PROCESSING_DELAY_US); - int numFrames; EXPECT_TRUE((numFrames = mCamera->waitForFrameBuffer(streamId)) > 0); @@ -1025,6 +1020,11 @@ TEST_F(ProCameraTest, WaitForSingleStreamBufferAndDropFrames) { ", dataPtr = " << (void*)buf.data << ", timestamp = " << buf.timestamp << std::endl; + // Process at 10fps, stream is at 15fps. + // This means we will definitely fill up the buffer queue with + // extra buffers and need to drop them. + usleep(TEST_FRAME_PROCESSING_DELAY_US); + EXPECT_OK(consumer->unlockBuffer(buf)); } -- cgit v1.1