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

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

Merge "binderRpcTest: sleeps /= 10" am: 028d0454 am: b42efa0b am:...

Merge "binderRpcTest: sleeps /= 10" am: 028d0454 am: b42efa0b am: 7f2d58d1 am: 4defbfdf am: 6f495ecc

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



Change-Id: I3307fd8f74aaf78f08a239113288265d6d9d0c6d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 90cff365 6f495ecc
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -788,12 +788,12 @@ TEST_P(BinderRpc, ThreadPoolGreaterThanEqualRequested) {
        ts.push_back(std::thread([&] { proc.rootIface->lockUnlock(); }));
    }

    usleep(100000); // give chance for calls on other threads
    usleep(10000); // give chance for calls on other threads

    // other calls still work
    EXPECT_EQ(OK, proc.rootBinder->pingBinder());

    constexpr size_t blockTimeMs = 500;
    constexpr size_t blockTimeMs = 50;
    size_t epochMsBefore = epochMillis();
    // after this, we should never see a response within this time
    EXPECT_OK(proc.rootIface->unlockInMsAsync(blockTimeMs));
@@ -1085,7 +1085,7 @@ TEST_P(BinderRpc, SingleDeathRecipient) {
    }

    std::unique_lock<std::mutex> lock(dr->mMtx);
    ASSERT_TRUE(dr->mCv.wait_for(lock, 1000ms, [&]() { return dr->dead; }));
    ASSERT_TRUE(dr->mCv.wait_for(lock, 100ms, [&]() { return dr->dead; }));

    // need to wait for the session to shutdown so we don't "Leak session"
    EXPECT_TRUE(proc.proc.sessions.at(0).session->shutdownAndWait(true));
@@ -1120,7 +1120,7 @@ TEST_P(BinderRpc, SingleDeathRecipientOnShutdown) {

    std::unique_lock<std::mutex> lock(dr->mMtx);
    if (!dr->dead) {
        EXPECT_EQ(std::cv_status::no_timeout, dr->mCv.wait_for(lock, 1000ms));
        EXPECT_EQ(std::cv_status::no_timeout, dr->mCv.wait_for(lock, 100ms));
    }
    EXPECT_TRUE(dr->dead) << "Failed to receive the death notification.";

@@ -1703,7 +1703,7 @@ TEST_P(BinderRpcServerOnly, Shutdown) {

    bool shutdown = false;
    for (int i = 0; i < 10 && !shutdown; i++) {
        usleep(300 * 1000); // 300ms; total 3s
        usleep(30 * 1000); // 30ms; total 300ms
        if (server->shutdown()) shutdown = true;
    }
    ASSERT_TRUE(shutdown) << "server->shutdown() never returns true";