forked from dotnet/android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Improve TimeZoneInfo Emulator test reliability; Emulator 30.3.5 (d…
…otnet#5566) The TimeZoneInfo Emulator tests have been very unreliable recently. We speculate that this is down to the emulator not running as fast as it used to on the CI system, possibly due to commit 75317db. Improve the reliability of the TimeZoneInfo Emulator tests: Add `[NonParallelizable]` to tests to ensure that they are not run in parallel. These tests are run on an emulator, and For Great Sanity™ we don't want these tests run in parallel *anyway*: the tests involve changing the `persist.sys.timezone` system property, which is effectively a global variable. We can't sanely run these in parallel (unless we spin up multiple emulators…?). Add a `[Retry]` attribute to at least re-run a test once if it fails. This might help if the emulator is running slowly. Add the following commands both before and after each test: RunAdbCommand ($"shell am force-stop --user all {proj.PackageName}"); RunAdbCommand ($"shell am kill --user all {proj.PackageName}"); These commands will force the application to stop, and force any background tasks the application has to stop as well. This is the best way we could find to completely quit an application. While we were expecting the `TimeZoneChanged` notification to fire if the app was already running, it turns out that when setting the date time via `adb`, the broadcast does *not* get sent. The broadcast is only sent when the timezone is changed via the Settings screen. Thus exiting the application completely and forcing a restart is the best option for this particular test scenario. We should investigate to see if we can script the timezone change via the UI so we can test the broadcast, but that should be done later. Run the TimeZoneInfo tests across *4* CI nodes, not 3 nodes, as the previous changes increased execution time enough to cause frequent timeouts. Running across more CI nodes helps reduce the overall time. Finally, bump to Android Emulator v30.3.5: * https://androidstudio.googleblog.com/2020/05/emulator-30013-canary.html * https://androidstudio.googleblog.com/2020/05/emulator-30014-canary.html * https://androidstudio.googleblog.com/2020/05/emulator-30015-canary.html * https://androidstudio.googleblog.com/2020/06/emulator-30016-canary.html * https://androidstudio.googleblog.com/2020/06/emulator-30017-canary.html * https://androidstudio.googleblog.com/2020/06/emulator-30018-canary.html * https://androidstudio.googleblog.com/2020/06/emulator-30019-canary.html * https://androidstudio.googleblog.com/2020/07/emulator-30020-canary.html * https://androidstudio.googleblog.com/2020/07/emulator-30021-canary.html * https://androidstudio.googleblog.com/2020/07/emulator-30022-canary.html * https://androidstudio.googleblog.com/2020/07/emulator-30023-canary.html * https://androidstudio.googleblog.com/2020/08/emulator-30024-canary.html * https://androidstudio.googleblog.com/2020/08/emulator-30025-canary.html * https://androidstudio.googleblog.com/2020/08/emulator-30026-canary.html * https://androidstudio.googleblog.com/2020/08/emulator-3010-canary.html * https://androidstudio.googleblog.com/2020/08/emulator-3011-canary.html * https://androidstudio.googleblog.com/2020/09/emulator-3013-canary.html
- Loading branch information
1 parent
accc846
commit 7189f77
Showing
6 changed files
with
60 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters