Test fails 50% of time becuase Apk installation failures for test suites that used test sharding with 8 emulators at once #120
Description
I am running 8 Android stock emulators for test sharding at once via Composer. It often fails due to Apk installation failure on 1 of emulators. This happened like 50% of time and it's random. With this APK installation error, the entire test just abort.
So far I have tried:
- Uninstall APKs via scripts
- Restart all emulators via scripts before running the test.
- restart adb server before test run
- reduce emulators to run at once (8 seemed to be reasonable as I look into system process monitor)
Environment:
- MacPro OS X 10.13.2
- 8 Android Stock Emulators API level 26
- Java 1.8
- Composor composer-0.2.9.jar
Exception in thread "main" java.lang.IllegalStateException: Process [script, -F, /Users/jenkins/workspace/FWAutomation/AndroidGenericSuite03-Composer-Run/80356821957255.output, /Users/jenkins/Library/Android/sdk/platform-tools/adb, -s, emulator-5556, install, -r, /Users/jenkins/catanandroid/Android/build/outputs/apk/worldFastProd/debug/Android-world-fast-prod-debug.apk] exited with non-zero code 1 Script started on Wed Jan 17 11:30:25 2018 command: /Users/jenkins/Library/Android/sdk/platform-tools/adb -s emulator-5556 install -r /Users/jenkins/catanandroid/Android/build/outputs/apk/worldFastProd/debug/Android-world-fast-prod-debug.apk adb: connect error for write: protocol fault (couldn't read status): Connection reset by peer