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

Commit 0ebdaad0 authored by Steven Moreland's avatar Steven Moreland
Browse files

binderRpcTest: threadpool race leak

SessionWithIncomingThreadpoolDoesntLeak is flaking at 0.02%.
This is another small fix to avoid noise in the tests. It's
not great, but we know it works because OnewayCallExhaustion
uses this solution and does not flake.

Bug: 285206261
Test: binderRpcTest --gtest_filter="*SessionWithIncomingThreadpoolDoesntLeak*"
Change-Id: I8a1678e9633db71cb4afda2f0f5c108ca784f803
parent 0c590d71
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -691,7 +691,11 @@ TEST_P(BinderRpc, SessionWithIncomingThreadpoolDoesntLeak) {

    EXPECT_EQ(nullptr, session.promote());

    sleep(1); // give time for remote session to shutdown
    // now that it has died, wait for the remote session to shutdown
    std::vector<int32_t> remoteCounts;
    do {
        EXPECT_OK(proc.rootIface->countBinders(&remoteCounts));
    } while (remoteCounts.size() > 1);
}

TEST_P(BinderRpc, SingleDeathRecipient) {