summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2022-07-15 16:14:24 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-07-15 16:14:24 +0000
commit9daf1b2aaeebe8bf1b59ea9c676b28d2b1a3e7dc (patch)
tree073c657552185478334dcf6947127fae71e0302c /libs
parent01edcb276f05d437c0a33e6ee19d2bfabef47f2a (diff)
parent45636073b7f3cb09c71e220e30f1cd81c763b3e4 (diff)
Merge "binderLibTest: wait longer to start all threads" am: 4477824cc4 am: 45636073b7
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2152317 Change-Id: Ieaac0894d064f658ccbea6a68975821e1f8b51fb Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs')
-rw-r--r--libs/binder/tests/binderLibTest.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/libs/binder/tests/binderLibTest.cpp b/libs/binder/tests/binderLibTest.cpp
index 4ed3309e0c..e72f39c24a 100644
--- a/libs/binder/tests/binderLibTest.cpp
+++ b/libs/binder/tests/binderLibTest.cpp
@@ -1310,7 +1310,7 @@ TEST_F(BinderLibTest, ThreadPoolAvailableThreads) {
* not exceed 16 (15 Max + pool thread).
*/
std::vector<std::thread> ts;
- for (size_t i = 0; i < kKernelThreads - 1; i++) {
+ for (size_t i = 0; i < kKernelThreads; i++) {
ts.push_back(std::thread([&] {
Parcel local_reply;
EXPECT_THAT(server->transact(BINDER_LIB_TEST_LOCK_UNLOCK, data, &local_reply),
@@ -1318,7 +1318,7 @@ TEST_F(BinderLibTest, ThreadPoolAvailableThreads) {
}));
}
- data.writeInt32(1);
+ data.writeInt32(100);
// Give a chance for all threads to be used
EXPECT_THAT(server->transact(BINDER_LIB_TEST_UNLOCK_AFTER_MS, data, &reply), NO_ERROR);
@@ -1329,8 +1329,7 @@ TEST_F(BinderLibTest, ThreadPoolAvailableThreads) {
EXPECT_THAT(server->transact(BINDER_LIB_TEST_GET_MAX_THREAD_COUNT, data, &reply),
StatusEq(NO_ERROR));
replyi = reply.readInt32();
- // No more than 16 threads should exist.
- EXPECT_TRUE(replyi == kKernelThreads || replyi == kKernelThreads + 1);
+ EXPECT_EQ(replyi, kKernelThreads + 1);
}
size_t epochMillis() {