{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

IdlingPolicy

class IdlingPolicy


Allows users to control idling idleTimeouts in Espresso.

Summary

Public constructors

Public functions

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.

Unit
handleTimeout(busyResources: (Mutable)List<String!>!, message: String!)

Invoked when the idle idleTimeout has been exceeded.

Public constructors

IdlingPolicy

IdlingPolicy()

Public functions

getDisableOnTimeout

fun getDisableOnTimeout(): Boolean

getIdleTimeout

fun getIdleTimeout(): Long

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

getIdleTimeoutUnit

fun getIdleTimeoutUnit(): TimeUnit!

The unit for getIdleTimeout.

getTimeoutIfDebuggerAttached

fun getTimeoutIfDebuggerAttached(): Boolean

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

handleTimeout

fun handleTimeout(busyResources: (Mutable)List<String!>!, message: String!): Unit

Invoked when the idle idleTimeout has been exceeded.

Parameters
busyResources: (Mutable)List<String!>!

the resources that are not idle.

message: String!

an additional message to include in an exception.