summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2022-10-05 00:24:16 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2022-10-05 00:24:16 +0000
commit028d0454bc4baebd49239eb2bc894452804c6b78 (patch)
treef1ce78ab5380fc8b972dc08302d7215c8960bd59
parent23f910cb5e72725e713b48f7a064c0d7ea3863a1 (diff)
parentdd231e2796971ec8b7813a596ca3e1e961eabb8e (diff)
Merge "binderRpcTest: sleeps /= 10"
-rw-r--r--libs/binder/tests/binderRpcTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/binder/tests/binderRpcTest.cpp b/libs/binder/tests/binderRpcTest.cpp
index 652da991a4..fbc83046e0 100644
--- a/libs/binder/tests/binderRpcTest.cpp
+++ b/libs/binder/tests/binderRpcTest.cpp
@@ -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";