自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
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)
添加一个条目以跳过重试。
|
|
getCommandLineArgs()
返回重试决策的命令行参数。
|
CurrentInvocation.IsolationGrade
|
getIsolationGrade()
|
int
|
getMaxTestCaseAttempts()
自动重试期间,每次测试运行的尝试次数上限。
|
int
|
getMaxTestCaseAttempts(ModuleDefinition module)
自动重试期间,给定模块在每次测试运行中的尝试次数上限。
|
int
|
getMaxTestRunAttempts()
自动重试期间,每次测试运行的尝试次数上限。
|
int
|
getMaxTestRunAttempts(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)
添加一个条目以跳过重试。
getCommandLineArgs
public getCommandLineArgs ()
返回重试决策的命令行参数。
getMaxTestCaseAttempts
public int getMaxTestCaseAttempts ()
自动重试期间,每次测试运行的尝试次数上限。
getMaxTestCaseAttempts
public int getMaxTestCaseAttempts (ModuleDefinition module)
自动重试期间,给定模块在每次测试运行中的尝试次数上限。
参数 |
module |
ModuleDefinition |
getMaxTestRunAttempts
public int getMaxTestRunAttempts ()
自动重试期间,每次测试运行的尝试次数上限。
getMaxTestRunAttempts
public int getMaxTestRunAttempts (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。 |
useUpdatedReporting
public boolean useUpdatedReporting ()
如果应使用更新后的报告,则返回 true。
受保护的方法
isolateRetry
protected void isolateRetry ( devices)
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-06-12。
[null,null,["最后更新时间 (UTC):2025-06-12。"],[],[]]