IRetryDecision
public
interface
IRetryDecision
com.android.tradefed.retry.IRetryDecision |
Interface driving the retry decision and applying the filter on the class for more targeted retry.
Summary
Public methods | |
---|---|
abstract
void
|
addLastAttempt(
|
abstract
int
|
getMaxRetryCount()
The maximum number of attempts during auto-retry. |
abstract
RetryStatistics
|
getRetryStatistics()
Returns the |
abstract
RetryStrategy
|
getRetryStrategy()
The |
abstract
boolean
|
isAutoRetryEnabled()
Whether or not to enable auto-retry. |
abstract
boolean
|
rebootAtLastAttempt()
Whether or not to reboot the device before the last attempt. |
abstract
void
|
setInvocationContext(IInvocationContext context)
Set the current invocation context. |
abstract
boolean
|
shouldRetry(IRemoteTest test, int attemptJustExecuted,
Decide whether or not retry should be attempted. |
abstract
boolean
|
shouldRetry(IRemoteTest test, ModuleDefinition module, int attemptJustExecuted,
Decide whether or not retry should be attempted. |
abstract
boolean
|
useUpdatedReporting()
Returns true if we should use the updated reporting. |
Public methods
addLastAttempt
public abstract void addLastAttempt (lastResults)
ERROR(/#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List))
will most likely be called before the last retry
attempt, so we might be missing the very last attempt results for statistics purpose. This
method allows those results to be provided for proper statistics calculations.
getMaxRetryCount
public abstract int getMaxRetryCount ()
The maximum number of attempts during auto-retry.
Returns | |
---|---|
int |
getRetryStatistics
public abstract RetryStatistics getRetryStatistics ()
Returns the RetryStatistics
representing the retry.
Returns | |
---|---|
RetryStatistics |
getRetryStrategy
public abstract RetryStrategy getRetryStrategy ()
The RetryStrategy
used during auto-retry.
Returns | |
---|---|
RetryStrategy |
isAutoRetryEnabled
public abstract boolean isAutoRetryEnabled ()
Whether or not to enable auto-retry.
Returns | |
---|---|
boolean |
rebootAtLastAttempt
public abstract boolean rebootAtLastAttempt ()
Whether or not to reboot the device before the last attempt.
Returns | |
---|---|
boolean |
setInvocationContext
public abstract void setInvocationContext (IInvocationContext context)
Set the current invocation context.
Parameters | |
---|---|
context |
IInvocationContext |
shouldRetry
public abstract boolean shouldRetry (IRemoteTest test, int attemptJustExecuted,previousResults)
Decide whether or not retry should be attempted. Also make any necessary changes to the
IRemoteTest
to be retried (Applying filters, etc.).
Parameters | |
---|---|
test |
IRemoteTest : The IRemoteTest that just ran. |
attemptJustExecuted |
int : The number of the attempt that we just ran. |
previousResults |
: The list of TestRunResult of the test that just ran. |
Returns | |
---|---|
boolean |
True if we should retry, False otherwise. |
Throws | |
---|---|
DeviceNotAvailableException |
Can be thrown during device recovery |
shouldRetry
public abstract boolean shouldRetry (IRemoteTest test, ModuleDefinition module, int attemptJustExecuted,previousResults)
Decide whether or not retry should be attempted. Also make any necessary changes to the
IRemoteTest
to be retried (Applying filters, etc.).
Parameters | |
---|---|
test |
IRemoteTest : The IRemoteTest that just ran. |
module |
ModuleDefinition : The ModuleDefinition object for the test module. |
attemptJustExecuted |
int : The number of the attempt that we just ran. |
previousResults |
: The list of TestRunResult of the test that just ran. |
Returns | |
---|---|
boolean |
True if we should retry, False otherwise. |
Throws | |
---|---|
DeviceNotAvailableException |
Can be thrown during device recovery |
useUpdatedReporting
public abstract boolean useUpdatedReporting ()
Returns true if we should use the updated reporting.
Returns | |
---|---|
boolean |