IdlingPolicy

public final class IdlingPolicy


Allows users to control idling idleTimeouts in Espresso.

Summary

Public constructors

Public methods

boolean
long

The amount of time the policy allows a resource to be non-idle.

TimeUnit

The unit for getIdleTimeout.

boolean

When true, timeouts should occur even if a debugger is attached to the VM.

void
handleTimeout(List<String> busyResources, String message)

Invoked when the idle idleTimeout has been exceeded.

Public constructors

IdlingPolicy

public IdlingPolicy()

Public methods

getDisableOnTimeout

public boolean getDisableOnTimeout()

getIdleTimeout

public long getIdleTimeout()

The amount of time the policy allows a resource to be non-idle.

getIdleTimeoutUnit

public TimeUnit getIdleTimeoutUnit()

The unit for getIdleTimeout.

getTimeoutIfDebuggerAttached

public boolean getTimeoutIfDebuggerAttached()

When true, timeouts should occur even if a debugger is attached to the VM. When false, they should be suppressed.

handleTimeout

public void handleTimeout(List<String> busyResources, String message)

Invoked when the idle idleTimeout has been exceeded.

Parameters
List<String> busyResources

the resources that are not idle.

String message

an additional message to include in an exception.