IRetryDecision
public
interface
IRetryDecision
| com.android.tradefed.retry.IRetryDecision |
再試行の決定を制御し、クラスにフィルタを適用して、より的を絞った再試行を行うインターフェース。
概要
パブリック メソッド | |
|---|---|
abstract
void
|
addLastAttempt(List<TestRunResult> lastResults)
|
default
void
|
addToSkipRetryList(String filterEntry)
再試行をスキップするエントリを追加します。 |
abstract
List<String>
|
getCommandLineArgs()
再試行の決定のコマンドライン引数を返します。 |
abstract
int
|
getMaxTestCaseAttempts()
自動再試行時のテスト実行あたりの最大試行回数。 |
abstract
int
|
getMaxTestCaseAttempts(ModuleDefinition module)
自動再試行中に特定のモジュールに対してテスト実行ごとに試行する最大回数。 |
abstract
int
|
getMaxTestRunAttempts()
自動再試行時のテスト実行あたりの最大試行回数。 |
abstract
int
|
getMaxTestRunAttempts(ModuleDefinition module)
自動再試行中に特定のモジュールに対してテスト実行ごとに試行する最大回数。 |
abstract
RetryStatistics
|
getRetryStatistics()
再試行を表す |
abstract
RetryStrategy
|
getRetryStrategy()
自動再試行中に使用される |
abstract
boolean
|
isAutoRetryEnabled()
自動再試行を有効にするかどうか。 |
abstract
boolean
|
rebootAtLastAttempt()
最後の試行の前にデバイスを再起動するかどうか。 |
abstract
void
|
setInvocationContext(IInvocationContext context)
現在の呼び出しコンテキストを設定します。 |
abstract
boolean
|
shouldRetry(IRemoteTest test, ModuleDefinition module, int attemptJustExecuted, List<TestRunResult> previousResults, DeviceNotAvailableException dnae)
再試行を試みるかどうかを決定します。 |
abstract
boolean
|
shouldRetry(IRemoteTest test, int attemptJustExecuted, List<TestRunResult> previousResults)
再試行を試みるかどうかを決定します。 |
abstract
RetryPreparationDecision
|
shouldRetryPreparation(ModuleDefinition module, int attempt, int maxAttempt)
モジュールの準備を再試行するかどうかを決定します。 |
abstract
boolean
|
useUpdatedReporting()
更新されたレポートを使用する必要がある場合は true を返します。 |
パブリック メソッド
addLastAttempt
public abstract void addLastAttempt (List<TestRunResult> lastResults)
shouldRetry(IRemoteTest,int,List) は最後の再試行の前に呼び出される可能性が高いため、統計目的で最後の試行の結果が欠落する可能性があります。この方法により、適切な統計計算のために結果を提供できます。
addToSkipRetryList
public void addToSkipRetryList (String filterEntry)
再試行をスキップするエントリを追加します。
| パラメータ | |
|---|---|
filterEntry |
String |
getCommandLineArgs
public abstract List<String> getCommandLineArgs ()
再試行の決定のコマンドライン引数を返します。
| 戻り値 | |
|---|---|
List<String> |
|
getMaxTestCaseAttempts
public abstract int getMaxTestCaseAttempts ()
自動再試行時のテスト実行あたりの最大試行回数。
| 戻り値 | |
|---|---|
int |
|
getMaxTestCaseAttempts
public abstract int getMaxTestCaseAttempts (ModuleDefinition module)
自動再試行中に特定のモジュールに対してテスト実行ごとに試行する最大回数。
| パラメータ | |
|---|---|
module |
ModuleDefinition |
| 戻り値 | |
|---|---|
int |
|
getMaxTestRunAttempts
public abstract int getMaxTestRunAttempts ()
自動再試行時のテスト実行あたりの最大試行回数。
| 戻り値 | |
|---|---|
int |
|
getMaxTestRunAttempts
public abstract int getMaxTestRunAttempts (ModuleDefinition module)
自動再試行中に特定のモジュールに対してテスト実行ごとに試行する最大回数。
| パラメータ | |
|---|---|
module |
ModuleDefinition |
| 戻り値 | |
|---|---|
int |
|
getRetryStatistics
public abstract RetryStatistics getRetryStatistics ()
再試行を表す RetryStatistics を返します。
| 戻り値 | |
|---|---|
RetryStatistics |
|
getRetryStrategy
public abstract RetryStrategy getRetryStrategy ()
自動再試行中に使用される RetryStrategy。
| 戻り値 | |
|---|---|
RetryStrategy |
|
isAutoRetryEnabled
public abstract boolean isAutoRetryEnabled ()
自動再試行を有効にするかどうか。
| 戻り値 | |
|---|---|
boolean |
|
rebootAtLastAttempt
public abstract boolean rebootAtLastAttempt ()
最後の試行の前にデバイスを再起動するかどうか。
| 戻り値 | |
|---|---|
boolean |
|
setInvocationContext
public abstract void setInvocationContext (IInvocationContext context)
現在の呼び出しコンテキストを設定します。
| パラメータ | |
|---|---|
context |
IInvocationContext |
shouldRetry
public abstract boolean shouldRetry (IRemoteTest test, ModuleDefinition module, int attemptJustExecuted, List<TestRunResult> previousResults, DeviceNotAvailableException dnae)
再試行を試みるかどうかを決定します。また、再試行する IRemoteTest に必要な変更(フィルタの適用など)も行います。
| パラメータ | |
|---|---|
test |
IRemoteTest: 実行されたばかりの IRemoteTest。 |
module |
ModuleDefinition: テスト モジュールの ModuleDefinition オブジェクト。 |
attemptJustExecuted |
int: 実行した試行の番号。 |
previousResults |
List: 実行されたテストの TestRunResult のリスト。 |
dnae |
DeviceNotAvailableException: デバイスの DeviceNotAvailableException が利用できない例外。 |
| 戻り値 | |
|---|---|
boolean |
再試行すべき場合は True、それ以外の場合は False。 |
| 例外 | |
|---|---|
DeviceNotAvailableException |
デバイスの復元中にスローされる可能性があります |
shouldRetry
public abstract boolean shouldRetry (IRemoteTest test, int attemptJustExecuted, List<TestRunResult> previousResults)
再試行を試みるかどうかを決定します。また、再試行する IRemoteTest に必要な変更(フィルタの適用など)も行います。
| パラメータ | |
|---|---|
test |
IRemoteTest: 実行されたばかりの IRemoteTest。 |
attemptJustExecuted |
int: 実行した試行の番号。 |
previousResults |
List: 実行されたテストの TestRunResult のリスト。 |
| 戻り値 | |
|---|---|
boolean |
再試行すべき場合は True、それ以外の場合は False。 |
| 例外 | |
|---|---|
DeviceNotAvailableException |
デバイスの復元中にスローされる可能性があります |
shouldRetryPreparation
public abstract RetryPreparationDecision shouldRetryPreparation (ModuleDefinition module, int attempt, int maxAttempt)
モジュールの準備を再試行するかどうかを決定します。
| パラメータ | |
|---|---|
module |
ModuleDefinition |
attempt |
int |
maxAttempt |
int |
| 戻り値 | |
|---|---|
RetryPreparationDecision |
|
useUpdatedReporting
public abstract boolean useUpdatedReporting ()
更新されたレポートを使用する必要がある場合は true を返します。
| 戻り値 | |
|---|---|
boolean |
|