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

Commit 712f48c2 authored by Tim Murray's avatar Tim Murray
Browse files

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
parent bce81ecc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;