Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix part of #2480: Work around for espresso tests in ExplorationActivityTest #2777

Closed
wants to merge 1 commit into from

Conversation

srikanthkb
Copy link
Contributor

@srikanthkb srikanthkb commented Feb 24, 2021

Explanation

Fixes part of #2480 :

This PR is a work-around for the test testAudioWithWifi_openRatioExploration_clickAudioIcon_checkAudioFragmentHasDefaultLanguageAndAutoPlays() in ExplorationActivityTest to be successful on Espresso.
More detailed investigation is required on how testCoroutineDispatchers.unregisterIdleResource() allows this test to pass on Espresso.

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The PR follows the style guide.
  • The PR does not contain any unnecessary auto-generated code from Android Studio.
  • The PR is made from a branch that's not called "develop".
  • The PR is made from a branch that is up-to-date with "develop".
  • The PR's branch is based on "develop" and not on any other branch.
  • The PR is assigned to an appropriate reviewer in both the Assignees and the Reviewers sections.

@anandwana001
Copy link
Contributor

@srikanthkb
Copy link
Contributor Author

@Srikanth-Kb PTAL
https://gist.github.com/anandwana001/fa497cb8981606313c9dc3a8a26fcdb3

This is passing successfully for each run that I made locally. But, I am not sure how safe testCoroutineDispatchers.registerIdlingResource() is for these tests. Also, there is no guarantee that this will work 100% of the runs. Should we maybe get Ben's opinion on this ?

@anandwana001
Copy link
Contributor

We will be deferring to Ben, once we are able to pass the test on both Espresso and Robolectric. I will be trying more on this week and update here.

@anandwana001
Copy link
Contributor

Closing this PR

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.

2 participants