diff options
author | Tim Murray <timmurray@google.com> | 2022-04-19 17:36:33 -0700 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2022-04-20 03:33:16 +0000 |
commit | 712f48c2176b4833cafb4972478939c8e8f7f04a (patch) | |
tree | 1c983d0924b796715b425ff729f52729500d539a /biometrics/fingerprint/aidl/default/tests/WorkerThreadTest.cpp | |
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
Diffstat (limited to 'biometrics/fingerprint/aidl/default/tests/WorkerThreadTest.cpp')
-rw-r--r-- | biometrics/fingerprint/aidl/default/tests/WorkerThreadTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/biometrics/fingerprint/aidl/default/tests/WorkerThreadTest.cpp b/biometrics/fingerprint/aidl/default/tests/WorkerThreadTest.cpp index b2417bd242..902fb40c6b 100644 --- a/biometrics/fingerprint/aidl/default/tests/WorkerThreadTest.cpp +++ b/biometrics/fingerprint/aidl/default/tests/WorkerThreadTest.cpp @@ -71,7 +71,7 @@ TEST(WorkerThreadTest, ScheduleReturnsFalseWhenQueueIsFull) { TEST(WorkerThreadTest, TasksExecuteInOrder) { constexpr int NUM_TASKS = 10000; - WorkerThread worker(NUM_TASKS); + WorkerThread worker(NUM_TASKS + 1); std::mutex mut; std::condition_variable cv; |