android / android/android-test
Orchestrator fails if service disconnects
- Vorherrschende Sprache
- Java
- Sterne
- 1.2k
- Forks
- 342
- Ø Merge
- 11 Std. 29 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
### Description
Our test suite has recently begun crashing without running all the tests.
From logcat, it looks like we are running into memory pressure and Android is killing the Orchestration Service.
The OrchestratedInstrumentationListener code does not trigger a reconnect to the service on disconnect, and this makes tests fail if the service is killed. Once the service is killed there is no way to recover. The code should be updated to rebind the service on an unbind.
In addition the service is not being bound with flag Service.BIND_IMPORTANT which would make the Orchestration Service less likely to be killed under memory pressure.
### Steps to Reproduce
I have outlined steps to reproduce here:
https://issuetracker.google.com/issues/135574731
Note that you may have to add tests which consume memory to cause the service to be killed.
### Expected Results
The orchestrator does not crash.
### Actual Results
The orchestrator crashes and only a small subset of our tests are run.
### AndroidX Test and Android OS Versions
AndroidX 1.2.0 - Tested on both 26 and 27.
Beitragsleitfaden
Rechercherichtung
Beginne mit OrchestratedInstrumentationListener und dem Code für die Service-Bindung und folge dann den Reproduktionsschritten unter issuetracker.google.com/issues/135574731 mit AndroidX Test 1.2.0 auf Android 26 oder 27. Überprüfe das Verhalten, wenn Android den Orchestration Service unter Speicherdruck beendet; abgeschlossen ist die Aufgabe, wenn der Service nach unbind erneut gebunden wird, mit Service.BIND_IMPORTANT gebunden ist und die vollständige Testsuite weiterläuft.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- android, java
- Bereich
- mobile, testing-qa
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100