summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorMichael Plass <mplass@google.com>2017-12-04 11:39:13 -0800
committerMichael Plass <mplass@google.com>2017-12-14 05:44:28 +0000
commit992588ca30e503436a0486b659f9f0ff57ce96f1 (patch)
tree8965fe702e586c92cf6ae183a7b84a8d08f41381 /tools/aapt2/java/JavaClassGenerator_test.cpp
parentc9f1a9e3dd214b167a49ac4560382e2e98084ff6 (diff)
Fix flaky WifiTrackerTest
The rssiChangeBroadcastShouldUpdateConnectedAp uses two CountDownLatch instances to synchronize the events on the main thread and the handler thread. The "latch" informs the main thread that mockWifiManager.getConnectionInfo() has been called and allows it to proceed, and "mAccessPointsChangedLatch" notes that onAccessPointsChanged is called. But mAccessPointsChangedLatch was assigned after "latch" released the main thread, so that on occasion the main thread could try to use it before this assignment, causing the timeout. Move the assignment of mAccessPointsChangedLatch to before the body of the test to prevent this race. Bug: 70163367 Test: runtest --path frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java Change-Id: I62c1ef9a2155ffbd08b5e07e94723b28102d1f6d
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions