Skip to content

Conversation

dabrynskiy
Copy link
Contributor

@dabrynskiy dabrynskiy commented Jul 20, 2025

Description of the problem:
Teardown from rule androidx.test.ext.junit.rules.ActivityScenarioRule waits for idle state before destroing activity.
In case of AppNotIdle exception error this results in infinite test execution.
In order to reproduce the problem in sample-app the activity BusyActivity was added, a test was added that launches this activity com.atiurin.sampleapp.tests.espresso.UltronActivityRuleTest#appNotIdle

Changes:
Added rule com.atiurin.ultron.testlifecycle.activity.UltronActivityRule - is a reduced copy from androidx.test.ext.junit.rules.ActivityScenarioRule. com.atiurin.ultron.testlifecycle.activity.UltronActivityRule
finishing all activities in the RESUMED, PAUSED, STOPPED stage without wait idle state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant