Fix data race in RecentsLoaderTests
Fix data race in RecentsLoaderTests#testContentsUpdate_observable() that would occur when accessing `private boolean mContentChanged` variable from the Main (a.k.a. UI) thread and the thread the test runs on. Instead of relying on a class member mContentChanged use the existing thread-safe CountDownLatch object. Bug: 288342044 Test: atest --rerun-until-failure 10000 \ DocumentsUIUnitTests:com.android.documentsui.RecentsLoaderTests Change-Id: I336ecddf4c894d1ba383a4246e7eb4a58ac200e2 Merged-In: I336ecddf4c894d1ba383a4246e7eb4a58ac200e2 (cherry picked from commit f243c48d)
Loading
Please register or sign in to comment