IRetryDecision
public
interface
IRetryDecision
com.android.tradefed.retry.IRetryDecision |
واجهة تُحدّد قرار إعادة المحاولة وتطبّق الفلتر على الفئة لإعادة المحاولة بشكلٍ أكثر استهدافًا
ملخّص
الطرق العامة | |
---|---|
abstract
void
|
addLastAttempt(
من المرجّح أن يتم استدعاء |
default
void
|
addToSkipRetryList(String filterEntry)
أضِف إدخالًا لتخطّي إعادة المحاولة. |
abstract
int
|
getMaxRetryCount()
الحد الأقصى لعدد المحاولات أثناء إعادة المحاولة التلقائية |
abstract
int
|
getMaxRetryCount(ModuleDefinition module)
الحد الأقصى لعدد المحاولات أثناء إعادة المحاولة التلقائية لمكوّن معيّن. |
abstract
RetryStatistics
|
getRetryStatistics()
لعرض الرمز |
abstract
RetryStrategy
|
getRetryStrategy()
|
abstract
boolean
|
isAutoRetryEnabled()
ما إذا كان سيتم تفعيل ميزة إعادة المحاولة التلقائية أم لا |
abstract
boolean
|
rebootAtLastAttempt()
ما إذا كان يجب إعادة تشغيل الجهاز قبل المحاولة الأخيرة |
abstract
void
|
setInvocationContext(IInvocationContext context)
اضبط سياق الاستدعاء الحالي. |
abstract
boolean
|
shouldRetry(IRemoteTest test, ModuleDefinition module, int attemptJustExecuted,
تحديد ما إذا كان يجب إعادة المحاولة أم لا |
abstract
boolean
|
shouldRetry(IRemoteTest test, int attemptJustExecuted,
تحديد ما إذا كان يجب إعادة المحاولة أم لا |
abstract
RetryPreparationDecision
|
shouldRetryPreparation(ModuleDefinition module, int attempt, int maxAttempt)
تحديد ما إذا كان يجب إعادة محاولة إعداد الوحدة أم لا |
abstract
boolean
|
useUpdatedReporting()
تعرِض هذه السمة القيمة "صحيح" إذا كان علينا استخدام التقارير المعدَّلة. |
الطرق العامة
addLastAttempt
public abstract void addLastAttempt (lastResults)
من المرجّح أن يتم استدعاء ERROR(/#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List))
قبل محاولة إعادة المحاولة
الأخيرة، لذا قد لا تظهر لنا نتائج المحاولة الأخيرة لأغراض إحصائية. تسمح هذه الطريقة
بتقديم هذه النتائج لإجراء عمليات حسابية إحصائية صحيحة.
addToSkipRetryList
public void addToSkipRetryList (String filterEntry)
أضِف إدخالًا لتخطّي إعادة المحاولة.
المعلمات | |
---|---|
filterEntry |
String |
getMaxRetryCount
public abstract int getMaxRetryCount ()
الحد الأقصى لعدد المحاولات أثناء إعادة المحاولة التلقائية
المرتجعات | |
---|---|
int |
getMaxRetryCount
public abstract int getMaxRetryCount (ModuleDefinition module)
الحد الأقصى لعدد المحاولات أثناء إعادة المحاولة التلقائية لمكوّن معيّن.
المعلمات | |
---|---|
module |
ModuleDefinition |
المرتجعات | |
---|---|
int |
getRetryStatistics
public abstract RetryStatistics getRetryStatistics ()
لعرض الرمز RetryStatistics
الذي يمثّل إعادة المحاولة.
المرتجعات | |
---|---|
RetryStatistics |
getRetryStrategy
public abstract RetryStrategy getRetryStrategy ()
RetryStrategy
المستخدَمة أثناء إعادة المحاولة التلقائية
المرتجعات | |
---|---|
RetryStrategy |
isAutoRetryEnabled
public abstract boolean isAutoRetryEnabled ()
ما إذا كان سيتم تفعيل ميزة إعادة المحاولة التلقائية أم لا
المرتجعات | |
---|---|
boolean |
rebootAtLastAttempt
public abstract boolean rebootAtLastAttempt ()
ما إذا كان يجب إعادة تشغيل الجهاز قبل المحاولة الأخيرة
المرتجعات | |
---|---|
boolean |
setInvocationContext
public abstract void setInvocationContext (IInvocationContext context)
اضبط سياق الاستدعاء الحالي.
المعلمات | |
---|---|
context |
IInvocationContext |
shouldRetry
public abstract boolean shouldRetry (IRemoteTest test, ModuleDefinition module, int attemptJustExecuted,previousResults, DeviceNotAvailableException dnae)
تحديد ما إذا كان يجب إعادة المحاولة أم لا عليك أيضًا إجراء أي تغييرات ضرورية على
IRemoteTest
لإعادة المحاولة (تطبيق الفلاتر وما إلى ذلك).
المعلمات | |
---|---|
test |
IRemoteTest : IRemoteTest الذي تم تنفيذه للتو |
module |
ModuleDefinition : عنصر ModuleDefinition لوحدة الاختبار |
attemptJustExecuted |
int : رقم المحاولة التي أجريناها للتو. |
previousResults |
: قائمة TestRunResult للاختبار الذي تم إجراؤه للتو |
dnae |
DeviceNotAvailableException : استثناء DeviceNotAvailableException الجهاز غير متاح |
المرتجعات | |
---|---|
boolean |
صحيح إذا كان علينا إعادة المحاولة، وخطأ في الحالات الأخرى. |
عمليات الرمي | |
---|---|
DeviceNotAvailableException |
يمكن طرحها أثناء استرداد الجهاز |
shouldRetry
public abstract boolean shouldRetry (IRemoteTest test, int attemptJustExecuted,previousResults)
تحديد ما إذا كان يجب إعادة المحاولة أم لا عليك أيضًا إجراء أي تغييرات ضرورية على
IRemoteTest
لإعادة المحاولة (تطبيق الفلاتر وما إلى ذلك).
المعلمات | |
---|---|
test |
IRemoteTest : IRemoteTest الذي تم تنفيذه للتو |
attemptJustExecuted |
int : رقم المحاولة التي أجريناها للتو. |
previousResults |
: قائمة TestRunResult للاختبار الذي تم إجراؤه للتو |
المرتجعات | |
---|---|
boolean |
صحيح إذا كان علينا إعادة المحاولة، وخطأ في الحالات الأخرى. |
عمليات الرمي | |
---|---|
DeviceNotAvailableException |
يمكن طرحها أثناء استرداد الجهاز |
shouldRetryPreparation
public abstract RetryPreparationDecision shouldRetryPreparation (ModuleDefinition module, int attempt, int maxAttempt)
تحديد ما إذا كان يجب إعادة محاولة إعداد الوحدة أم لا
المعلمات | |
---|---|
module |
ModuleDefinition |
attempt |
int |
maxAttempt |
int |
المرتجعات | |
---|---|
RetryPreparationDecision |
useUpdatedReporting
public abstract boolean useUpdatedReporting ()
تعرِض هذه السمة القيمة "صحيح" إذا كان علينا استخدام التقارير المعدَّلة.
المرتجعات | |
---|---|
boolean |