透過集合功能整理內容
你可以依據偏好儲存及分類內容。
BaseRetryDecision
public
class
BaseRetryDecision
extends Object
implements
IConfigurationReceiver,
IRetryDecision,
ITestInformationReceiver
java.lang.Object
|
↳ |
com.android.tradefed.retry.BaseRetryDecision
|
IRetryDecision
的基本實作方式。基本導入作業只會考量本機信號。
摘要
公用方法 |
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。
|
公用建構函式
BaseRetryDecision
public BaseRetryDecision ()
重試決定的建構函式
公用方法
addToSkipRetryList
public void addToSkipRetryList (String filterEntry)
新增項目來略過重試。
getFailedTestCases
public static getFailedTestCases ( previousResults)
傳回應重試的失敗測試案例對應項目。
getMaxRetryCount
public int getMaxRetryCount ()
自動重試時的嘗試次數上限。
getMaxRetryCount
public int getMaxRetryCount (ModuleDefinition module)
指定模組自動重試時的最大重試次數。
參數 |
module |
ModuleDefinition |
getSkipRetrySet
public getSkipRetrySet ()
isAutoRetryEnabled
public boolean isAutoRetryEnabled ()
是否啟用自動重試功能。
rebootAtLastAttempt
public boolean rebootAtLastAttempt ()
在最後一次嘗試前,是否要重新啟動裝置。
setInvocationContext
public void setInvocationContext (IInvocationContext context)
設定目前的叫用內容。
參數 |
context |
IInvocationContext |
public void setTestInformation (TestInformation testInformation)
參數 |
testInformation |
TestInformation |
shouldRetry
public boolean shouldRetry (IRemoteTest test,
int attemptJustExecuted,
previousResults)
決定是否應重試。另外,請對要重試的 IRemoteTest
進行必要變更 (例如套用篩選器)。
傳回 |
boolean |
如果應重試,則傳回 True,否則傳回 False。 |
shouldRetryPreparation
public RetryPreparationDecision shouldRetryPreparation (ModuleDefinition module,
int attempt,
int maxAttempt)
決定是否應重試模組準備作業。
參數 |
module |
ModuleDefinition |
attempt |
int |
maxAttempt |
int |
useUpdatedReporting
public boolean useUpdatedReporting ()
如果應使用更新版報表,則會傳回 true。
受保護的方法
isolateRetry
protected void isolateRetry ( devices)
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-03-19 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-03-19 (世界標準時間)。"],[],[]]