Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9a88146 authored by Steven Moreland's avatar Steven Moreland Committed by Gerrit Code Review
Browse files

Merge "binderRpcTest: stronger check for synchronous cbs"

parents 028182d9 03ecce67
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -1248,9 +1248,14 @@ TEST_P(BinderRpc, Callbacks) {
                            proc.rootIface->doCallback(cb, callbackIsOneway, delayed, kTestString));
                }

                // if both transactions are synchronous and the response is sent back on the
                // same thread, everything should have happened in a nested call. Otherwise,
                // the callback will be processed on another thread.
                if (callIsOneway || callbackIsOneway || delayed) {
                    using std::literals::chrono_literals::operator""s;
                    std::unique_lock<std::mutex> _l(cb->mMutex);
                    cb->mCv.wait_for(_l, 1s, [&] { return !cb->mValues.empty(); });
                }

                EXPECT_EQ(cb->mValues.size(), 1)
                        << "callIsOneway: " << callIsOneway