Stay organized with collections Save and categorize content based on your preferences.

RemoteTestTimeOutEnforcer

public class RemoteTestTimeOutEnforcer
extends Object implements ITestInvocationListener

java.lang.Object
   ↳ com.android.tradefed.testtype.suite.RemoteTestTimeOutEnforcer


Listeners that allows to check the execution time of a given test config and fail it if it goes over a given timeout.

Note that this enforcer doesn't interrupt the tests, but will make them fail.

Summary

Fields

public static final String REMOTE_TEST_TIMEOUT_DESCRIPTION

public static final String REMOTE_TEST_TIMEOUT_OPTION

Public constructors

RemoteTestTimeOutEnforcer(ModuleListener listener, ModuleDefinition moduleDefinition, IRemoteTest test, Duration timeOut)

Create the RemoteTestTimeOutEnforcer with the given timeout to enforce.

Public methods

void testRunEnded(long elapsedTime, runMetrics)

Fields

REMOTE_TEST_TIMEOUT_DESCRIPTION

public static final String REMOTE_TEST_TIMEOUT_DESCRIPTION

REMOTE_TEST_TIMEOUT_OPTION

public static final String REMOTE_TEST_TIMEOUT_OPTION

Public constructors

RemoteTestTimeOutEnforcer

public RemoteTestTimeOutEnforcer (ModuleListener listener, 
                ModuleDefinition moduleDefinition, 
                IRemoteTest test, 
                Duration timeOut)

Create the RemoteTestTimeOutEnforcer with the given timeout to enforce.

Parameters
listener ModuleListener: The ModuleListener for each test run.

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

test IRemoteTest: The IRemoteTest to be executed.

timeOut Duration: The ERROR(/Duration) of the time out per test run.

Public methods

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

Parameters
elapsedTime long

runMetrics