android / android/android-test

Orchestrator fails if service disconnects

オープン
#396 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
1.2k
フォーク
342
平均マージ
11時間 29分
マージ済み PR(30日)
2

説明

### 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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

OrchestratedInstrumentationListener とサービスのバインド処理のコードから始め、Android 26 または 27 上の AndroidX Test 1.2.0 で issuetracker.google.com/issues/135574731 の再現手順に従います。メモリ逼迫時に Android が Orchestration Service を停止した場合の動作を確認します。unbind 後にサービスが再バインドされ、Service.BIND_IMPORTANT を指定してバインドされ、完全なテストスイートが継続することを確認できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, java
領域
mobile, testing-qa
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。