Skip to content

ActivityScenario.getResult() occasionally delays 45 secs #676

@mikepenz

Description

@mikepenz

Description

Using the new ActivityScenario for our tests. Sadly in various occasions the getResult() will wait 30 seconds until it returns successfully. This behavior is not deterministic as sometimes it works again.

In both cases the result will be delivered successfully.

In cases the getResult() waits for 45 seconds the tested activity is already finished and the empty activity with black background is shown.

Steps to Reproduce

The steps in our project to reproduce:

launchActivity

ActivityScenario.use{ 
    // do the testing  
    // ui code finishing the activity
 
    // retrieve `result` 
    result.checkResultData()
}

Expected Results

It would not wait for 45 seconds but less time before retrieving the result data

Actual Results

It freezes randomly for 45 seconds before successful result data is retrieved

AndroidX Test and Android OS Versions

  • 3.3.0-rc01
  • Android 11, but also happening on Android 10

Link to a public git repo demonstrating the problem:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions