{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
class IdlingPolicies
Allows users fine grain control over idling policies.
Espresso's default idling policies are suitable for most usecases - however certain execution environments (like the ARM emulator) might be very slow. This class allows users the ability to adjust defaults to sensible values for their environments.
Public constructors |
|
|---|---|
Public functions |
|
|---|---|
java-static Unit |
setIdlingResourceTimeout(timeout: Long, unit: TimeUnit!)Updates the IdlingPolicy used by IdlingResourceRegistry to determine when IdlingResources timeout. |
java-static Unit |
setMasterPolicyTimeout(timeout: Long, unit: TimeUnit!)Updates the IdlingPolicy used in UiController.loopUntil to detect AppNotIdleExceptions. |
java-static Unit |
setMasterPolicyTimeoutWhenDebuggerAttached(This method overrides Espresso's default behaviour of disabling timeouts when a step debugger is attached to the VM. |
Public properties |
|
|---|---|
volatile java-static IdlingPolicy! |
|
volatile java-static IdlingPolicy! |
|
volatile java-static IdlingPolicy! |
|
java-static fun setIdlingResourceTimeout(timeout: Long, unit: TimeUnit!): Unit
Updates the IdlingPolicy used by IdlingResourceRegistry to determine when IdlingResources timeout.
java-static fun setMasterPolicyTimeout(timeout: Long, unit: TimeUnit!): Unit
Updates the IdlingPolicy used in UiController.loopUntil to detect AppNotIdleExceptions.
java-static fun setMasterPolicyTimeoutWhenDebuggerAttached(
timeoutWhenDebuggerAttached: Boolean
): Unit
This method overrides Espresso's default behaviour of disabling timeouts when a step debugger is attached to the VM. Setting the timeout flag reenables the behaviour of throwing a timeout exception.
The value set in this method is superceded if unsafeMakeMasterPolicyWarning is also called.
volatile java-static val dynamicIdlingResourceErrorPolicy: IdlingPolicy!
volatile java-static val dynamicIdlingResourceWarningPolicy: IdlingPolicy!