summaryrefslogtreecommitdiff
path: root/libs/androidfw/ApkParsing.cpp
diff options
context:
space:
mode:
author Jimmy Shiu <jimmyshiu@google.com> 2023-04-19 13:49:53 +0800
committer Jimmy Shiu <jimmyshiu@google.com> 2023-04-19 16:37:50 +0000
commit5ecea7cdd07b0d24178da2406519a98d80a8e2f8 (patch)
tree62e9dbdeb0703e8f371cde8b4a2fbc67360e3603 /libs/androidfw/ApkParsing.cpp
parenta067b1c0ee7082f22eb88410177e935b3dc5dc8e (diff)
Fixed flaky HintManagerServiceTest#testReportActualWorkDuration
The flake is related to the running sequence. If Object#notify() is called before Object#wait(), the latter will block forever. Using CountDownLatch to solve the problem. CountDownLatch#await() will wait until its count reaches 0. CountDownLatch with an initial count of 1, so the code after CountDownLatch#await() will only run after CountDownLatch#countDown() has been called. Bug: 277881247 Test: atest HintManagerServiceTest Test: verify by adding sleep between countdown() and await() Change-Id: I1a2b0fbec5f48f504107e3c031bf6e9f3ff571f5
Diffstat (limited to 'libs/androidfw/ApkParsing.cpp')
0 files changed, 0 insertions, 0 deletions