Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

avoid race condition when calling getMapAsync from OnMapReadyIdlingResource #12308

Merged
merged 1 commit into from
Jul 5, 2018

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Jul 4, 2018

Closes #10998 , this PR moves the invocation in of getMapAsync in OnMapReadyIdlingResource to the main thread. Our tests where suffering from an occasional race condition (1 out 7000 executions) where the style could have been loaded but due to thread switching this was missed when calling getMapSync from the other thread. Will need to do some additional tests run to confirm but I'm hoping proposed code will fix the root cause.

cc @mapbox/android as this file has been used in different projects

@tobrun tobrun added Android Mapbox Maps SDK for Android tests labels Jul 4, 2018
@tobrun tobrun added this to the android-v6.3.0 milestone Jul 4, 2018
@tobrun tobrun self-assigned this Jul 4, 2018
@tobrun tobrun requested a review from LukasPaczos July 4, 2018 15:11
Copy link
Member

@LukasPaczos LukasPaczos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@tobrun tobrun merged commit 9920b25 into master Jul 5, 2018
@tobrun tobrun deleted the tvn-flaky-tests branch July 5, 2018 09:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky instrumented tests
2 participants