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

Commit 00457851 authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

Merge "binderRpcTest: stronger check for synchronous cbs" am: b9a88146 am:...

Merge "binderRpcTest: stronger check for synchronous cbs" am: b9a88146 am: 637ef737 am: 18276414 am: 9028bffe am: 1a7728a6

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2098511



Change-Id: I63e8fe669635c2358ed4da8b853f87e1e7fe81d4
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 381c5547 1a7728a6
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