Index: src/libchcore/Tests/TOverlappedDataBufferQueueTests.cpp =================================================================== diff -u -rcb4e9d4b60d62b25ae2cf556c0642601af56c787 -rd265da146d8ea0b4318dd63c0993ba3a88a620c3 --- src/libchcore/Tests/TOverlappedDataBufferQueueTests.cpp (.../TOverlappedDataBufferQueueTests.cpp) (revision cb4e9d4b60d62b25ae2cf556c0642601af56c787) +++ src/libchcore/Tests/TOverlappedDataBufferQueueTests.cpp (.../TOverlappedDataBufferQueueTests.cpp) (revision d265da146d8ea0b4318dd63c0993ba3a88a620c3) @@ -377,12 +377,20 @@ queue.AddFinishedBuffer(pBuffers[2]); queue.AddFinishedBuffer(pBuffers[0]); - queue.GetFinishedBuffer(); + TOverlappedDataBuffer* pBuffer = queue.GetFinishedBuffer(); + EXPECT_TIMEOUT(queue.GetEventWriteFinishedHandle()); + queue.MarkFinishedBufferAsComplete(pBuffer); EXPECT_SIGNALED(queue.GetEventWriteFinishedHandle()); - queue.GetFinishedBuffer(); + + pBuffer = queue.GetFinishedBuffer(); + EXPECT_TIMEOUT(queue.GetEventWriteFinishedHandle()); + queue.MarkFinishedBufferAsComplete(pBuffer); EXPECT_SIGNALED(queue.GetEventWriteFinishedHandle()); - queue.GetFinishedBuffer(); + + pBuffer = queue.GetFinishedBuffer(); EXPECT_TIMEOUT(queue.GetEventWriteFinishedHandle()); + queue.MarkFinishedBufferAsComplete(pBuffer); + EXPECT_TIMEOUT(queue.GetEventWriteFinishedHandle()); } TEST(TOverlappedDataBufferQueueTests, GetFinishedBuffer_WrongOrder)