自动重试
public interface IAutoRetriableTest
implements IRemoteTest
com.android.tradefed.testtype.retry.IAutoRetriableTest |
接口的IRemoteTest
没有实现ITestFilterReceiver
但仍希望支持自动重试。
对于大多数跑步者的建议是实施ITestFilterReceiver
,并给了哪些测试正在运行的线束处理精细的控制。但在某些情况下,这可能是不可能的,并且需要某种委托形式的重试。
概括
公共方法 | |
---|---|
default boolean | shouldRetry (int attemptJustExecuted, previousResults) shouldRetry (int attemptJustExecuted, previousResults) |
公共方法
应该重试
public boolean shouldRetry (int attemptJustExecuted,previousResults)
从委托ERROR(IRetryDecision#shouldRetry(IRemoteTest, int, List)/com.android.tradefed.retry.IRetryDecision#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List) IRetryDecision#shouldRetry(IRemoteTest, int, List))
决定是否应该尝试重试。另外,还要在必要的修改IRemoteTest
重试(应用过滤器,准备下一次运行等)。
参数 | |
---|---|
attemptJustExecuted | int :尝试的,我们只是跑的次数。 |
previousResults | TestRunResult 测试,只是跑去。 |
退货 | |
---|---|
boolean | 如果我们应该重试,则为 True,否则为 False。 |
投掷 | |
---|---|
DeviceNotAvailableException | 可以在设备恢复期间抛出 |