Mir

Code review comment for lp://qastaging/~afrantzis/mir/fix-1317801

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> Can be replaced with:
>
> auto handle = client_acquire_async(q);
> handle->wait_for(std::chrono::seconds(3));
> ASSERT_THAT(handle->has_acquired_buffer(), Eq(true));

For this test we need the following sequence of events to occur:

1. client_acquire_async() request (which blocks because we have already client_acquired/released the only buffer previously)
2. compositor_acquire() which gets the single buffer and also releases the only buffer back to the client and unblocks it

So a single thread wouldn't work because it would block in handle->wait_for(std::chrono::seconds(3)); (and fail).

> Use AutoJoinThread so that thread is still joined in case compositor_acquire
> or compositor_release throws.

Will do.

« Back to merge proposal