BaseRetryDecision

public class BaseRetryDecision
extends Object implements IConfigurationReceiver, IRetryDecision, ITestInformationReceiver

java.lang.Object
   ↳ com.android.tradefed.retry.BaseRetryDecision


IRetryDecision の基本実装。ベース実装では、ローカル シグナルのみが考慮されます。

概要

パブリック コンストラクタ

BaseRetryDecision()

再試行の決定のコンストラクタ

パブリック メソッド

void addLastAttempt( lastResults)

ERROR(/#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List)) は最後の再試行の前に呼び出されることが多いため、統計目的で最後の試行結果が欠落する可能性があります。

void addToSkipRetryList(String filterEntry)

再試行をスキップするエントリを追加します。

static getFailedTestCases( previousResults)

再試行が必要な失敗したテストケースのマップを返します。

CurrentInvocation.IsolationGrade getIsolationGrade()
int getMaxRetryCount()

自動再試行中の試行回数の上限。

int getMaxRetryCount(ModuleDefinition module)

特定のモジュールの自動再試行中の最大試行回数。

RetryStatistics getRetryStatistics()

再試行を表す RetryStatistics を返します。

RetryStrategy getRetryStrategy()

自動再試行中に使用される RetryStrategy

getSkipRetrySet()
TestInformation getTestInformation()
boolean isAutoRetryEnabled()

自動再試行を有効にするかどうか。

boolean rebootAtLastAttempt()

最後の試行の前にデバイスを再起動するかどうか。

void setConfiguration(IConfiguration configuration)

使用中の IConfiguration を挿入します。

void setInvocationContext(IInvocationContext context)

現在の呼び出しコンテキストを設定します。

void setTestInformation(TestInformation testInformation)
boolean shouldRetry(IRemoteTest test, ModuleDefinition module, int attemptJustExecuted, previousResults, DeviceNotAvailableException dnae)

再試行を試みるかどうかを決定します。

boolean shouldRetry(IRemoteTest test, int attemptJustExecuted, previousResults)

再試行を試みるかどうかを決定します。

RetryPreparationDecision shouldRetryPreparation(ModuleDefinition module, int attempt, int maxAttempt)

モジュールの準備を再試行するかどうかを決定します。

boolean useUpdatedReporting()

更新されたレポートを使用する必要がある場合は true を返します。

保護されたメソッド

void isolateRetry( devices)

パブリック コンストラクタ

BaseRetryDecision

public BaseRetryDecision ()

再試行の決定のコンストラクタ

パブリック メソッド

addLastAttempt

public void addLastAttempt ( lastResults)

ERROR(/#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List)) は最後の再試行の前に呼び出されることが多いため、統計目的で最後の試行結果が欠落する可能性があります。この方法では、適切な統計計算のためにこれらの結果を提供できます。

addToSkipRetryList

public void addToSkipRetryList (String filterEntry)

再試行をスキップするエントリを追加します。

パラメータ
filterEntry String

getFailedTestCases

public static  getFailedTestCases ( previousResults)

再試行が必要な失敗したテストケースのマップを返します。

パラメータ
previousResults

戻り値

getIsolationGrade

public CurrentInvocation.IsolationGrade getIsolationGrade ()

戻り値
CurrentInvocation.IsolationGrade

getMaxRetryCount

public int getMaxRetryCount ()

自動再試行の最大試行回数。

戻り値
int

getMaxRetryCount

public int getMaxRetryCount (ModuleDefinition module)

特定のモジュールの自動再試行の最大試行回数。

パラメータ
module ModuleDefinition

戻り値
int

getRetryStatistics

public RetryStatistics getRetryStatistics ()

再試行を表す RetryStatistics を返します。

戻り値
RetryStatistics

getRetryStrategy

public RetryStrategy getRetryStrategy ()

自動再試行中に使用される RetryStrategy

戻り値
RetryStrategy

getSkipRetrySet

public  getSkipRetrySet ()

戻り値

getTestInformation

public TestInformation getTestInformation ()

戻り値
TestInformation

isAutoRetryEnabled

public boolean isAutoRetryEnabled ()

自動再試行を有効にするかどうか。

戻り値
boolean

rebootAtLastAttempt

public boolean rebootAtLastAttempt ()

最後の試行の前にデバイスを再起動するかどうか。

戻り値
boolean

setConfiguration

public void setConfiguration (IConfiguration configuration)

使用中の IConfiguration を挿入します。

パラメータ
configuration IConfiguration

setInvocationContext

public void setInvocationContext (IInvocationContext context)

現在の呼び出しコンテキストを設定します。

パラメータ
context IInvocationContext

setTestInformation

public void setTestInformation (TestInformation testInformation)

パラメータ
testInformation TestInformation

shouldRetry

public boolean shouldRetry (IRemoteTest test, 
                ModuleDefinition module, 
                int attemptJustExecuted, 
                 previousResults, 
                DeviceNotAvailableException dnae)

再試行を試みるかどうかを決定します。また、再試行する IRemoteTest に必要な変更を加えます(フィルタの適用など)。

パラメータ
test IRemoteTest: 実行したばかりの IRemoteTest

module ModuleDefinition: テスト モジュールの ModuleDefinition オブジェクト。

attemptJustExecuted int: 実行した試行回数。

previousResults : 実行したテストの TestRunResult のリスト。

dnae DeviceNotAvailableException: デバイスが使用できない例外の DeviceNotAvailableException

戻り値
boolean 再試行する必要がある場合は true、そうでない場合は false。

例外
DeviceNotAvailableException

shouldRetry

public boolean shouldRetry (IRemoteTest test, 
                int attemptJustExecuted, 
                 previousResults)

再試行を試みるかどうかを決定します。また、再試行する IRemoteTest に必要な変更を加えます(フィルタの適用など)。

パラメータ
test IRemoteTest: 実行したばかりの IRemoteTest

attemptJustExecuted int: 実行した試行回数。

previousResults : 実行したテストの TestRunResult のリスト。

戻り値
boolean 再試行する必要がある場合は true、そうでない場合は false。

例外
DeviceNotAvailableException

shouldRetryPreparation

public RetryPreparationDecision shouldRetryPreparation (ModuleDefinition module, 
                int attempt, 
                int maxAttempt)

モジュールの準備を再試行するかどうかを決定します。

パラメータ
module ModuleDefinition

attempt int

maxAttempt int

戻り値
RetryPreparationDecision

useUpdatedReporting

public boolean useUpdatedReporting ()

更新されたレポートを使用する必要がある場合は true を返します。

戻り値
boolean

保護されたメソッド

isolateRetry

protected void isolateRetry ( devices)

パラメータ
devices

例外
DeviceNotAvailableException