自動重試
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 | 可以在設備恢復期間拋出 |