commit | 712f48c2176b4833cafb4972478939c8e8f7f04a | [log] [tgz] |
---|---|---|
author | Tim Murray <timmurray@google.com> | Tue Apr 19 17:36:33 2022 -0700 |
committer | Tim Murray <timmurray@google.com> | Wed Apr 20 03:33:16 2022 +0000 |
tree | 1c983d0924b796715b425ff729f52729500d539a | |
parent | bce81ecc1e985225056b93f7b3c3b220a1b1b479 [diff] |
Fix WorkerThreadTest Queue capacity needs to be NUM_TASKS + 1 for the extra final cv.notify at the end. Test: atest --host --rerun-until-failure 1000 WorkerThreadTest Bug: b/229801892 Change-Id: I95eb07680fe80cfc3bfafaa2de81c48d61d14b4b
diff --git a/biometrics/fingerprint/aidl/default/tests/WorkerThreadTest.cpp b/biometrics/fingerprint/aidl/default/tests/WorkerThreadTest.cpp index b2417bd..902fb40 100644 --- a/biometrics/fingerprint/aidl/default/tests/WorkerThreadTest.cpp +++ b/biometrics/fingerprint/aidl/default/tests/WorkerThreadTest.cpp
@@ -71,7 +71,7 @@ TEST(WorkerThreadTest, TasksExecuteInOrder) { constexpr int NUM_TASKS = 10000; - WorkerThread worker(NUM_TASKS); + WorkerThread worker(NUM_TASKS + 1); std::mutex mut; std::condition_variable cv;