- Can't reproduce the race condition with manual test, probably the view updates are fast enough that only monkey test can reproduce the issue. - Reproduced a similar stacktrace and IndexOutOfBoundsException with Robolectric test by assuming that the race condition happens after text filtering and view updates. Try to fix the bug with this assumption - The fix is to bind the data (data position in adapter) with ViewHolder. Bug: 75322108 Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.datetime.timezone Change-Id: Ie5d932bce30590b8067e042c3380911c9608872f
Running Settings Robolectric tests
The full suite
$ croot
$ make RunSettingsRoboTests
Running a single test class
$ croot
$ make RunSettingsRoboTests ROBOTEST_FILTER=<ClassName>
For example:
make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
You can also use partial class name in ROBOTEST_FILTER. If the partial class name matches multiple file names, all of them will be executed.