BaseRetryDecision
public
class
BaseRetryDecision
extends Object
implements
IConfigurationReceiver,
IRetryDecision,
ITestInformationReceiver
java.lang.Object | |
↳ | com.android.tradefed.retry.BaseRetryDecision |
التنفيذ الأساسي لـ IRetryDecision
لا يأخذ التنفيذ الأساسي في الاعتبار سوى الإشارات المحلية.
ملخّص
وظائف الإنشاء العامة | |
---|---|
BaseRetryDecision()
مُنشئ لقرار إعادة المحاولة |
الطرق العامة | |
---|---|
void
|
addLastAttempt(
من المرجّح أن يتم استدعاء |
void
|
addToSkipRetryList(String filterEntry)
أضِف إدخالًا لتخطّي إعادة المحاولة. |
static
|
getFailedTestCases(
عرض خريطة حالات الاختبار التي تعذّر إكمالها والتي يجب إعادة المحاولة فيها |
CurrentInvocation.IsolationGrade
|
getIsolationGrade()
|
int
|
getMaxRetryCount()
الحد الأقصى لعدد المحاولات أثناء إعادة المحاولة التلقائية |
int
|
getMaxRetryCount(ModuleDefinition module)
الحد الأقصى لعدد المحاولات أثناء إعادة المحاولة التلقائية لمكوّن معيّن. |
RetryStatistics
|
getRetryStatistics()
لعرض الرمز |
RetryStrategy
|
getRetryStrategy()
|
|
getSkipRetrySet()
|
TestInformation
|
getTestInformation()
|
boolean
|
isAutoRetryEnabled()
ما إذا كان سيتم تفعيل ميزة إعادة المحاولة التلقائية أم لا |
boolean
|
rebootAtLastAttempt()
ما إذا كان يجب إعادة تشغيل الجهاز قبل المحاولة الأخيرة |
void
|
setConfiguration(IConfiguration configuration)
تحقِّق من استخدام |
void
|
setInvocationContext(IInvocationContext context)
اضبط سياق الاستدعاء الحالي. |
void
|
setTestInformation(TestInformation testInformation)
|
boolean
|
shouldRetry(IRemoteTest test, ModuleDefinition module, int attemptJustExecuted,
تحديد ما إذا كان يجب إعادة المحاولة أم لا |
boolean
|
shouldRetry(IRemoteTest test, int attemptJustExecuted,
تحديد ما إذا كان يجب إعادة المحاولة أم لا |
RetryPreparationDecision
|
shouldRetryPreparation(ModuleDefinition module, int attempt, int maxAttempt)
تحديد ما إذا كان يجب إعادة محاولة إعداد الوحدة أم لا |
boolean
|
useUpdatedReporting()
تعرِض هذه السمة القيمة "صحيح" إذا كان علينا استخدام التقارير المعدَّلة. |
الطرق المحمية | |
---|---|
void
|
isolateRetry(
|
وظائف الإنشاء العامة
BaseRetryDecision
public BaseRetryDecision ()
مُنشئ لقرار إعادة المحاولة
الطرق العامة
addLastAttempt
public void addLastAttempt (lastResults)
من المرجّح أن يتم استدعاء ERROR(/#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List))
قبل محاولة إعادة المحاولة
الأخيرة، لذا قد لا تظهر لنا نتائج المحاولة الأخيرة لأغراض إحصائية. تسمح هذه الطريقة
بتقديم هذه النتائج لإجراء عمليات حسابية إحصائية صحيحة.
addToSkipRetryList
public void addToSkipRetryList (String filterEntry)
أضِف إدخالًا لتخطّي إعادة المحاولة.
المعلمات | |
---|---|
filterEntry |
String |
getFailedTestCases
public staticgetFailedTestCases ( previousResults)
عرض خريطة حالات الاختبار التي تعذّر إكمالها والتي يجب إعادة المحاولة فيها
المعلمات | |
---|---|
previousResults |
|
المرتجعات | |
---|---|
|
getIsolationGrade
public CurrentInvocation.IsolationGrade getIsolationGrade ()
المرتجعات | |
---|---|
CurrentInvocation.IsolationGrade |
getMaxRetryCount
public int getMaxRetryCount ()
الحد الأقصى لعدد المحاولات أثناء إعادة المحاولة التلقائية
المرتجعات | |
---|---|
int |
getMaxRetryCount
public int getMaxRetryCount (ModuleDefinition module)
الحد الأقصى لعدد المحاولات أثناء إعادة المحاولة التلقائية لمكوّن معيّن.
المعلمات | |
---|---|
module |
ModuleDefinition |
المرتجعات | |
---|---|
int |
getRetryStatistics
public RetryStatistics getRetryStatistics ()
لعرض الرمز RetryStatistics
الذي يمثّل إعادة المحاولة.
المرتجعات | |
---|---|
RetryStatistics |
getRetryStrategy
public RetryStrategy getRetryStrategy ()
RetryStrategy
المستخدَم أثناء إعادة المحاولة التلقائية
المرتجعات | |
---|---|
RetryStrategy |
getSkipRetrySet
publicgetSkipRetrySet ()
المرتجعات | |
---|---|
|
isAutoRetryEnabled
public boolean isAutoRetryEnabled ()
ما إذا كان سيتم تفعيل ميزة إعادة المحاولة التلقائية أم لا
المرتجعات | |
---|---|
boolean |
rebootAtLastAttempt
public boolean rebootAtLastAttempt ()
ما إذا كان يجب إعادة تشغيل الجهاز قبل المحاولة الأخيرة أم لا
المرتجعات | |
---|---|
boolean |
setConfiguration
public void setConfiguration (IConfiguration configuration)
تحقِّق من استخدام IConfiguration
.
المعلمات | |
---|---|
configuration |
IConfiguration |
setInvocationContext
public void setInvocationContext (IInvocationContext context)
اضبط سياق الاستدعاء الحالي.
المعلمات | |
---|---|
context |
IInvocationContext |
setTestInformation
public void setTestInformation (TestInformation testInformation)
المعلمات | |
---|---|
testInformation |
TestInformation |
shouldRetry
public 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 boolean shouldRetry (IRemoteTest test, int attemptJustExecuted,previousResults)
تحديد ما إذا كان يجب إعادة المحاولة أم لا عليك أيضًا إجراء أي تغييرات ضرورية على
IRemoteTest
لإعادة المحاولة (تطبيق الفلاتر وما إلى ذلك).
المعلمات | |
---|---|
test |
IRemoteTest : IRemoteTest الذي تم تنفيذه للتو |
attemptJustExecuted |
int : رقم المحاولة التي أجريناها للتو. |
previousResults |
: قائمة TestRunResult للاختبار الذي تم إجراؤه للتو |
المرتجعات | |
---|---|
boolean |
صحيح إذا كان علينا إعادة المحاولة، وخطأ في الحالات الأخرى. |
عمليات الرمي | |
---|---|
DeviceNotAvailableException |
shouldRetryPreparation
public RetryPreparationDecision shouldRetryPreparation (ModuleDefinition module, int attempt, int maxAttempt)
تحديد ما إذا كان يجب إعادة محاولة إعداد الوحدة أم لا
المعلمات | |
---|---|
module |
ModuleDefinition |
attempt |
int |
maxAttempt |
int |
المرتجعات | |
---|---|
RetryPreparationDecision |
useUpdatedReporting
public boolean useUpdatedReporting ()
تعرِض هذه السمة القيمة "صحيح" إذا كان علينا استخدام التقارير المعدَّلة.
المرتجعات | |
---|---|
boolean |
الطرق المحمية
isolateRetry
protected void isolateRetry (devices)
المعلمات | |
---|---|
devices |
|
عمليات الرمي | |
---|---|
DeviceNotAvailableException |