‫RemoteTestTimeOutEnforcer

public class RemoteTestTimeOutEnforcer
extends ResultAndLogForwarder

java.lang.Object
com.android.tradefed.result.ResultForwarder
  com.android.tradefed.result.ResultAndLogForwarder
    com.android.tradefed.testtype.suite.RemoteTestTimeOutEnforcer


مستمعون يتيحون التحقّق من وقت تنفيذ إعداد اختبار معيّن وإيقافه إذا تجاوز مهلة معيّنة.

يُرجى العِلم أنّ هذا المُنفِّذ لا يوقف الاختبارات، ولكنّه سيؤدي إلى فشلها.

ملخّص

الثوابت

String REMOTE_TEST_TIMEOUT_DESCRIPTION

String REMOTE_TEST_TIMEOUT_OPTION

طُرق وضع التصميم العامة

RemoteTestTimeOutEnforcer(List<ITestInvocationListener> allListeners, ModuleDefinition moduleDefinition, IRemoteTest test, Duration timeOut)

إنشاء RemoteTestTimeOutEnforcer مع المهلة المحدّدة لفرضها.

الإجراءات العامة

void setGranularListener(ModuleListener listener)
void testRunEnded(long elapsedTime, HashMap<String, MetricMeasurement.Metric> runMetrics)

الإبلاغ عن نهاية تشغيل الاختبار.

الثوابت

REMOTE_TEST_TIMEOUT_DESCRIPTION

public static final String REMOTE_TEST_TIMEOUT_DESCRIPTION

Constant Value: "The timeout that will be applied to each remote test object of the run."

REMOTE_TEST_TIMEOUT_OPTION

public static final String REMOTE_TEST_TIMEOUT_OPTION

Constant Value: "remote-test-timeout"

طُرق وضع التصميم العامة

RemoteTestTimeOutEnforcer

public RemoteTestTimeOutEnforcer (List<ITestInvocationListener> allListeners, 
                ModuleDefinition moduleDefinition, 
                IRemoteTest test, 
                Duration timeOut)

إنشاء RemoteTestTimeOutEnforcer مع المهلة المحدّدة لفرضها.

المعلَمات
allListeners List

moduleDefinition ModuleDefinition: The ModuleDefinition of the test module to be executed.

test IRemoteTest: The IRemoteTest to be executed.

timeOut Duration: The Duration of the time out per test run.

الإجراءات العامة

setGranularListener

public void setGranularListener (ModuleListener listener)

المعلَمات
listener ModuleListener

testRunEnded

public void testRunEnded (long elapsedTime, 
                HashMap<String, MetricMeasurement.Metric> runMetrics)

الإبلاغ عن نهاية تشغيل الاختبار. FIXME: We cannot have two Map<> interfaces with different type, so we have to use HashMap here.

المعلَمات
elapsedTime long: device reported elapsed time, in milliseconds

runMetrics HashMap: key-value pairs reported at the end of a test run with Metric.